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.
mythicalLibrarian is tested using MythTV's head SVN revision. There was a stable past 256. Generic programming is now supported. Sports Events are supported.
Full list of functionality:
  • Renames Episodes to Title S##E## (Subtitle)
  • Renames Generic Programming to Title S0E0 (Subtitle)
  • Renames Movies to Movie (Year)
  • Generates RSS feeds to keep you up to date
  • Will render your files still human readable in the event you loose your database
  • Maintains consistancy by symlinking back to original file
  • Allows mythtv to serve files
  • Allows mythtv to delete files
  • Provides Ubuntu desktop notifications upon completed jobs
  • Provides episode lookups based upon zap2it ids referenced to thetvdb
  • Provides episode lookup based upon subtitle or original airdate
  • Optional primary and secondary Episodes, Movies, and Shows folders for NAS users
  • Creates COMSKIP files from mythcommflag
  • Creates NFO files for generic programming
  • Tracks and deletes created helper files if main video file is deleted
  • Sends notifications to XBMC
  • Updates XBMC's library
  • Provides detailed logs and daily report in the /daily report folder
  • Showtranslations allows for title renaming if guide data is incorrect
mythicalLibrarian has been tested and is running on my computer with MythTV head revision.
Like djroketboy, none of my posts survived the lightning strike, either Sad

Can you give a bit more detail on how the Sports Events are now supported? I am using svn 256 and I see that there is a "Cycling" subdirectory in my "Episodes" directory, but when I point XBMC to the "Cycling" Subdirectory and mark it as type=TV shows, it shows "zero episodes" in the TV Shows area of XBMC.

Keep in mind that I am also relatively new to XBMC so I may be missing something on that end.

/Greg
sports events should be handled using season (year) and episode (MonthDay). Can you post a debug log on your cycling dir? There should be a tvshow.nfo file in the folder as well as a nfo file that specifies the information for XBMC .
Upon some further investigation, it looks like the last time mythicalLibrarian tagged a Sports Event, it did in fact place it into an Episodes rather than Showings directory. So the earlier S0E0 files in my /Showings/Cycling subdirectory are probably artifacts of earlier versions of the script.

Is there an easy way to re-run just those files? Can I do a --scan mpg on the files that have been renamed to Cycling S0E0 [...] without messing up mythtv's database?

/Greg
for now all episodes which are tagged with the sports event label can be redone with --doover. I would like some feed back before I remove that --doover option from categoric handling files..

I need to know it works before they get dumped into showings. For now they are still handled pretty much the same way as a episode which did not get scraped and was handled like a generic show. Until I can get confirmation that everything works, it will stay the same way. Once I'm sure everything works I want to move sports events into the /showings folder and remove their --doover option.
Wow,

This crash could not have happened at a worst time LoL, I had posted a all my data about my busted MythicalLibrarian and was asking if I should somehow update mythtv to trunk and *poof* I was like damnnnn, where is everybody Sad

anyway, I am all screwed up after taking update that addressed unspecified episodes I got greedy and updated when I was stable and now getting this on mythweb status page after MythicalLibrarian runs

"Error: User job returned non-zero, check logs"

Looks like paths are messed up again and I when I update I choose where I want everyting but not changing

Mythtv version information (should I update?)
http://pastebin.com/wWTEW4A4

Errorlogs generated by mythbackend
http://pastebin.com/XV1q5RK0

logs from setup (update to 272)
http://pastebin.com/5xFT9Utp

MythicalLibrarian Debug
http://pastebin.com/F8pW3sWg


as usual any help or advice would be greatly appreciated Smile

strato
Try updating again. The errors were being falsely reported when sucessful. The permission errors can be fixed with a chown user:group /path/to/show command. I will review the update procedure tonight.
I upgraded to 272 and then ran --doover. No changes to the processing of the Cycling shows which are in my /Showings directories.

Here's the one that seems to have been libraried (is that a verb?) correctly:

Code:
ls -al /mnt/video2/store/Episodes/Cycling
total 1710840
drwxr-xr-x  2 mythtv mythtv       4096 2010-03-15 14:13 .
drwxrwxr-x 15 mythtv mythtv       4096 2010-03-17 08:22 ..
-rw-r--r--  1 mythtv mythtv 1750162876 2010-03-15 13:00 Cycling S2010E315 (Tirreno-Adriatico Recorded [email protected]).mpg
-rw-r--r--  1 mythtv mythtv        207 2010-03-15 14:13 Cycling S2010E315 (Tirreno-Adriatico Recorded [email protected]).nfo
-rw-r--r--  1 mythtv mythtv        124 2010-03-15 14:13 Cycling S2010E315 (Tirreno-Adriatico Recorded [email protected]).txt
-rw-r--r--  1 mythtv mythtv        136 2010-03-15 14:13 tvshow.nfo

Here's a 'ls -al' of my .../Showings/Cycling directory: http://pastebin.com/3zN5PHSK

And here is the output.log from the --doover run I just did: http://pastebin.com/gW2dA4yS
Hope that helps, and thanks as always for the support.

/Greg

Quote:
outleradam Wrote:for now all episodes which are tagged with the sports event label can be redone with --doover. I would like some feed back before I remove that --doover option from categoric handling files..

I need to know it works before they get dumped into showings. For now they are still handled pretty much the same way as a episode which did not get scraped and was handled like a generic show. Until I can get confirmation that everything works, it will stay the same way. Once I'm sure everything works I want to move sports events into the /showings folder and remove their --doover option.

Upon some further investigation, it looks like the last time mythicalLibrarian tagged a Sports Event, it did in fact place it into an Episodes rather than Showings directory. So the earlier S0E0 files in my /Showings/Cycling subdirectory are probably artifacts of earlier versions of the script.

Is there an easy way to re-run just those files? Can I do a --scan mpg on the files that have been renamed to Cycling S0E0 [...] without messing up mythtv's database?
When I ran --update to get svn 272, it put a 'mythicalLibrarian' in User Job #2 for MythTV, even though 'mythicalLibrarian' was already in User Job #1. Now I have two in there.

Bug or feature? Does it matter which of the two I delete?

/Greg
outleradam Wrote:for now all episodes which are tagged with the sports event label can be redone with --doover. I would like some feed back before I remove that --doover option from categoric handling files..

Running a --doover with SVN 272 didn't change the Sports Event files in my /Showings/Cycling subdirectory. Should I have done anything specific other than 'sudo mythicalLibrarian --doover' to specify those files?

Output log is here: http://pastebin.com/gW2dA4yS

ls -al of the files that need to be re-done is here: http://pastebin.com/3zN5PHSK

Thanks for the support!

/Greg
first make sure that all files were scanned properly in the first place
Code:
mythicalLibrarian --scan mpg /mnt/video1/store
mythicalLibrarian --scan mpg /mnt/video2/store
--scan ignores symlinks(already processed files)

If that does not work, what I would do in this case is a full reset of all possibly trackable files.
Code:
sudo mythicalLibrarian --undo
mythicalLibrarian --scan mpg /mnt/video1/store
mythicalLibrarian --scan mpg /mnt/video2/store
As for the user job issue, it did not match the entry which mythicalLibrarian was searching for. This may indicate a variance in the user job handling, or it may mean that mythtv is inserting extra data into the user job.

Please do:
Code:
mysql -u*YOURUSERNAME* -p*YOURPASSWORD* -e "use mythconverg; select data from settings where value like 'UserJob1';" | replace "data" "" |sed -n "2p"
mysql -u*YOURUSERNAME* -p*YOURPASSWORD* -e "use mythconverg; select data from settings where value like 'UserJob2';" | replace "data" "" |sed -n "2p"
Let me know what it says.

Also, are any of the cycling shows showing up with S2010?
Yes, there is one Cycling show that got filed with "S2010" in the /Episodes directory:

Code:
-rw-r--r--  1 mythtv mythtv 1750162876 2010-03-15 13:00 Cycling S2010E315 (Tirreno-Adriatico Recorded [email protected]).mpg
-rw-r--r--  1 mythtv mythtv        207 2010-03-15 14:13 Cycling S2010E315 (Tirreno-Adriatico Recorded [email protected]).nfo
-rw-r--r--  1 mythtv mythtv        124 2010-03-15 14:13 Cycling S2010E315 (Tirreno-Adriatico Recorded [email protected]).txt
-rw-r--r--  1 mythtv mythtv        136 2010-03-15 14:13 tvshow.nfo

...I'll try your suggestions on the --scan and the re-do later on tonight, hopefully.


Regarding the User Jobs, here's what the database says:

Re User Job #1: /usr/local/bin/mythicalLibrarian %DIR%/%FILE%

Re User Job #2: /usr/local/bin/mythicalLibrarian "%DIR%/%FILE%"




/Greg
outleradam Wrote:The permission errors can be fixed with a chown user:group /path/to/show command.

which folders are you saying I should run this on. sorry for asking but this is not my main OS,

thanks,

strato
^^ Actually, it looks like everything is working properly, however I did not code a showings dir into the easy setup program. I'm working on it now. It's about 98.9304852% ready. The girlfriend just made brownies, so I can't take care of it right now, but if you --update it will work.

GregoryK Wrote:Yes, there is one Cycling show that got filed with "S2010" in the /Episodes directory:

Code:
-rw-r--r--  1 mythtv mythtv 1750162876 2010-03-15 13:00 Cycling S2010E315 (Tirreno-Adriatico Recorded [email protected]).mpg
-rw-r--r--  1 mythtv mythtv        207 2010-03-15 14:13 Cycling S2010E315 (Tirreno-Adriatico Recorded [email protected]).nfo
-rw-r--r--  1 mythtv mythtv        124 2010-03-15 14:13 Cycling S2010E315 (Tirreno-Adriatico Recorded [email protected]).txt
-rw-r--r--  1 mythtv mythtv        136 2010-03-15 14:13 tvshow.nfo
...I'll try your suggestions on the --scan and the re-do later on tonight, hopefully.


Regarding the User Jobs, here's what the database says:

Re User Job #1: /usr/local/bin/mythicalLibrarian %DIR%/%FILE%

Re User Job #2: /usr/local/bin/mythicalLibrarian "%DIR%/%FILE%"




/Greg
I'd like to make sure everything gets resolved there. I want to finalize categoric naming. Let me know if you do not get season 2010.

The user job which the setup sets up requires quotes. This prevents errors with people having folders with spaces. It is better to have quotes. Delete user job #1. mythicalLibrarian will see user job #2 and ignore it from now on.
Starting to go a bit in circles here. I tried the --scan that you suggested in the earlier post. It sort of worked, three episodes got moved from one directory, but the other directories did not move the files out of "Showings", (this is using SVN 280)

So I tried the --undo you suggested as a reset, and got the following output:

Code:
[email protected]:~$ sudo mythicalLibrarian --undo
--You have entered undo mode.
In this mode of operation, mythicalLibrarian will reverse
file changes created by the current user while running.
mythicalLibrarian. There will be no indicators while undo
is running. It is important that this process is not
interupted or data loss may occour
  Press 'y' to continue or 'n' to exit..... y/(n):>y
mv: cannot move `/mnt/video2/store/Episodes/Cycling/Cycling S2010E313 (Tirreno-Adriatico Recorded [email protected]).mpg' to `/mnt/video2/store/1187_20100313170000.mpg': Permission denied
mv: cannot move `/mnt/video2/store/Episodes/Cycling/Cycling S2010E314 (Tirreno-Adriatico Recorded [email protected]).mpg' to `/mnt/video2/store/1187_20100314170000.mpg': Permission denied
mv: cannot move `/mnt/video2/store/Episodes/Cycling/Cycling S2010E316 (Tirreno-Adriatico Recorded [email protected]).mpg' to `/mnt/video2/store/1187_20100316120000.mpg': Permission denied
mv: cannot move `/mnt/video2/store/Episodes/Cycling/Cycling S2010E315 (Paris Nice Recorded [email protected]).mpg' to `/mnt/video2/store/1723_20100315130000.mpg': Permission denied

Not sure why we have permissions errors showing up now.

/Greg