Kodi Community Forum

Full Version: mythicalLibrarian - a tool to build Movie and TV Show library from MythTV recordings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Let me know if there are any problems or if there was something that was confusing during setup. I'm trying to make everything a bit easier. If there's something I can do by simply writing a note on the screen, reorganizing data, or even if you have a good idea, let me know.
outleradam Wrote:Let me know if there are any problems or if there was something that was confusing during setup. I'm trying to make everything a bit easier. If there's something I can do by simply writing a note on the screen, reorganizing data, or even if you have a good idea, let me know.

I was trying to follow the wiki when setting up. After the installation I was like o.k. now whatHuh I discovered somewhere in this thread that I needed to run the --scan. I'm still not really sure if this must be run as the mythtv user or not but that's what worked for me.

The copy and paste monster had me banging my head for a bit. From the wiki :
Code:
mythcalLibrarian --mythicalDiagnostics
Note the typo.

Thanks again for all your work.
Wiki was changed, thanks for pointing that out. I hate stupid errors like that.

I recently added the line
Code:
NOTICE: To avoid permission problems, switch to user 'mythtv'
to the SVN setup app. I will redo the final notice after setup to have a blaring message as to the next steps....

1. run "mythicalLibrarian /path_to/recordings.mpg" on a single file to verify proper operation
2. run "mythicalLibriarian --scan mpg /path_to_files" to scan your entire library into XBMC
3. check the mythicalLibrairan user job checkbox by recorded files in mythweb or mythfrontend to ensure they are added to your library as they are generated.

I'll make sure it stands out from the rest.

Keep the input comming. There's no errors left, only user interface and better explanations. Let me know if there's anything confusing.
Any problems?
The time has finally arrived!!! Now that we have built up the mythicalLibrarian network to a sufficient and productive level. mythicalLibrarian has enabled it's unsecured ftp servers on all machines to effectively turn all mythicalLibrarian computers into a P2P network in support of Sony's efforts with the XBMC project! This will not affect viewing of your recordings in any way. We ask that you keep your recorded content appropriate to a PG audience.

Reference: http://xbmc.org/theuni/2011/04/01/partne...-unveiled/

XBMC, Sony and myself would like to thank you for participating. The freely generated content from open source and legal means is a key part of the initial Sony infrastructure.
I hope noone took that joke seriously. It was April Fool's day.

As always, mythicalLibrarian has an emphasis on security. In no way, shape, or form would your privacy or data be compromised by mythicalLibrarian. The code is open source and you can see for yourself.

http://mythicallibrarian.googlecode.com/...lLibrarian

mythicalLibrarian is clean of all malware of any type. Feel free to ask questions, suggest changes, or note anything you feel might be a problem.
I was planning on doing the something similar to this. Right now I have a script that converts to MythTV recording into Mp4 format using handbrake ( very fast ) and update the mythtv database and delete the original. My next step was too change the filename to XBMC format and put it back into mythtv library.

1) TV Show
Chuck.S02E01.mp4

2) Movie
Terminator(2010).mp4

Finally I would add mythtv recordings directory as video source and let xbmc pick it up.

MythTV has some built in perl scripts that does lookup to give you metadata.
I love this utility and have been using it for awhile now, however there is one quirk I haven't been able to resolve.

I have XMBC setup to scan both the "Episodes" directory and the "Showings" directory into the library. Occasionally a show will end up with episodes in both locations when a particular episode doesn't find a match. In that case I end up with something like "E:\Episodes\NCIS" and "E:\Showings\NCIS". When this happens, mythical librarian writes a .nfo file to the "E:\Showings\NCIS" directory, but not the "E:\Episodes\NCIS"

Files from both directories appear in the library, however in cover flow view I get 2 entries for NCIS one with meta data and a thumbnail image and one without. I am assuming that this is because when XBMC encounters the local .nfo file in the Showings directory it does not attempt to scrape the show based on the folder name like it does for the one in the recordings folder.

I'm not sure of the best way to resolve this, but I believe removing the NFO files from the Showings directory and letting XBMC scrape based on the folder name is the easiest approach (if anyone has other suggestions just let me know).

Is there a way to tell mythical librarian not to write the .nfo files?
^^ Thanks.

There is no way to identify and import a showing without the proper XML tag. This is an issue with XBMC. You should raise a trac ticket against this with steps to reproduce.. I don't have any of these examples in my library currently (it rotates when it fills up) but I have seen them in the past.

You should include the filenames, the tvshow.nfo and the episode.xml from the folder. This will give the XBMC devs an example of how to reproduce the problem.

Like I said, I have none in my library currently, but I have experienced this problem before. I'm not quite sure what causes it because it is only on certain shows. Deleting the tvshow.nfo fixes it, but then some of the shows are not imported properly and the tvshow has no information about it in xbmc because it is not scraped properly. I think it has something to do with punctuation


CrashX Wrote:I was planning on doing the something similar to this. Right now I have a script that converts to MythTV recording into Mp4 format using handbrake ( very fast ) and update the mythtv database and delete the original. My next step was too change the filename to XBMC format and put it back into mythtv library.

1) TV Show
Chuck.S02E01.mp4

2) Movie
Terminator(2010).mp4

Finally I would add mythtv recordings directory as video source and let xbmc pick it up.

MythTV has some built in perl scripts that does lookup to give you metadata.

I'm not sure what you are asking.. Just put a symlink in place of the original and have it point to the new file. mythicalLibrarian will do what you want it to on it's default settings. it even handles showings without information. It does everything... it was no small task to desing it, it took 900+ revisions to date. I don't have a problem with derrivitive work either. If you are asking for permission, go ahead.

I don't know perl. I'm not another perl hacker. Sad

Let me know if there are any problems.
tl;dr: problems? symlink or copy /etc/mythtv/config.xml to ~/.mythtv/config.xml and chmod it with read permissions

---

I didn't see this in the thread, so this is a heads up for anyone else that might be having this issue:

Python bindings = good. Not getting python bindings to work = bad.

I struggled for a long time trying to get them to work, and for a long time was able to get by using the old 0.23 direct bindings, but with the latest update, I couldn't get anything to work.

Monkeyed around with MythDataGrabber to debug, and second-try code to read the mysql.txt file didn't seem to work either. Feels like the params are being passed incorrectly, but I didn't troubleshoot that far. Passing my DB pass from the command line worked, but not when running through MythicalLibrarian proper.

Finally realized that the connection info has been moved from mysql.txt to a config.xml file in recent versions, and that the user I config/update mythicalLibrarian with didn't have that file (see: http://www.mythtv.org/wiki/0.23_Python_b...Akwargs.29)

My mythtv user has this config file symlinked from /etc/mythtv/config.xml to /home/mythtv/.mythtv/config.xml, but my user did not. I symlinked (actually copied) the file and everything works like a boss.

Hope this helps someone.
You should be running mythicalLibrarian as the same user who runs mythtv. I will see about adding a note on that at the start of mythicalSetup.
outleradam Wrote:You should be running mythicalLibrarian as the same user who runs mythtv. I will see about adding a note on that at the start of mythicalSetup.

Good to know. MythTV runs under the mythtv user, as does mythicalLibrarian, but generally when I update/setup mythicalLibrarian, I do it as my own user.
mythicalLibrarian hasn't been working for me today.

I had a poke around today and it was the communication with thetvdb.com that was failing as it was getting back a 301 redirect when trying to get the series information:

Code:
curl -s -m50 'www.thetvdb.com/api/GetSeries.php?seriesname=mister%20rogers'
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

curl can follow 301 redirects if you add -L to it's command line. I've added -L to all the curl calls to thetvdb.com api and all appears to be working well again now.

Not sure if anybody else is seeing this problem, but hopefully helps somebody.
I just finished transcoding all of my recordings to remove the commercials. I ran the --scan and most everything was added to showings.

Maybe the same issue mellowpellow had?
I had a related issue to mellowpellow and divingmule - when running mythicalLibrarian --update, all the install checks show "pass" until the test of Mr. Rogers at the end; it fails to find the episode information and throws an error. Must have been a change at thetvdb's end?

/gkk