XBMC Community Forum
mythicalLibrarian - a tool to build Movie and TV Show library from MythTV recordings - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for XBMC (/forumdisplay.php?fid=116)
+--- Thread: mythicalLibrarian - a tool to build Movie and TV Show library from MythTV recordings (/showthread.php?tid=65644)



df splits lines - adecker89 - 2010-01-27 08:08

I actually just filed an issue on your googlecode site before I saw the link to here. Seems you can't post a reply there anyway...

I found that df will split its output into multiple lines if your filesystem path is too long for its formatting ( lvm tends to cause this), and this caused the freespace variables to bomb on me:

MoveDirFreeSpace=`df $MoveDir|sed -n 2p|awk '{print $4}'`

was giving me back spaces

But I found a real nice fix for this: "df -P" forces df to print results 1 per line. I added that to the four lines and now everything's running smoothly.


- Bueller - 2010-01-27 10:33

I just found another issue. The maintenance routine was not deleting the comskip files, but was removing the entries from comskiplog.tracking. The fix was easy, the rm command didn't have quotes around it.

I changed rm $FileToCheck to rm "$FileToCheck" which fixed it right up.


- outleradam - 2010-01-27 15:23

adecker89: Thanks. great detective work!
Bueller: Thanks. Change was added.

I really appreciate the help guys! I can't possibly check every configuration on my own. I really appreciate it.

New version here: https://sourceforge.net/projects/mythicallibrari/files/mythicalLibrarianBeta/mythicalLibrarian.sh/download




Stil Trying - okiekyle - 2010-01-28 06:33

Thanks so much for all the work you've done on this. This is exactly what I've been looking for. However, I have yet to get it to work successfully for me.

I have the version from yesterday (01/25)

Here is the log from a few recent attempts:

Code:
@@@@@@@@@@@NEW SEARCH INITIATED AT Mon Jan 25 23:12:00 CST 2010@@@@@@@@@@@@@
SEARCHING: www.TheTvDb.com SHOW NAME: Everybody Loves Raymond EPISODE: Young Girl
FILE NAME: /home/mythtv/Movies/1062_20100125224500.mpg
creating home mythicalLibrarian and log file
SEARCH FOUND:Everybody Loves Raymond ID#: 73663
DEFINED ABSOLOUTE EPISODE NUMBER:
%%%%%%%%%%www.TheTvDB.com information is incomplete Everybody Loves Raymond, Young Girl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%Please consider helping out and adding to thetvdb%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%OPERATION FAILED Mon Jan 25 23:12:02 CST 2010 %%%%%%%%%%%%%%%%%
@@@@@@@@@@@NEW SEARCH INITIATED AT Tue Jan 26 00:23:10 CST 2010@@@@@@@@@@@@@
SEARCHING: www.TheTvDb.com SHOW NAME: According to Jim EPISODE: ABCs  123s
FILE NAME: /home/mythtv/Movies/1081_20100125230300.mpg
creating home mythicalLibrarian and log file
SEARCH FOUND:According to Jim ID#: 75926
DEFINED ABSOLOUTE EPISODE NUMBER:
%%%%%%%%%%www.TheTvDB.com information is incomplete According to Jim, ABC's & 123's
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%Please consider helping out and adding to thetvdb%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%OPERATION FAILED Tue Jan 26 00:23:12 CST 2010 %%%%%%%%%%%%%%%%%
@@@@@@@@@@@NEW SEARCH INITIATED AT Tue Jan 26 12:21:27 CST 2010@@@@@@@@@@@@@
creating home mythicalLibrarian and log file
SEARCH FOUND:The View ID#:
DEFINED ABSOLOUTE EPISODE NUMBER:
%%%%%%%%%%www.TheTvDB.com information is incomplete The View,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%Please consider helping out and adding to thetvdb%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%OPERATION FAILED Tue Jan 26 12:21:28 CST 2010 %%%%%%%%%%%%%%%%%

On the 1st one (Everybody Loves Raymond - Young Girl) I can't figure out why it didn't find the info. It's there in TheTVDB.com (Season 5, Episode 8). Maybe I'm missing something.

On the 2nd one (According to Jim - ABC's & 123's) I notice that the line where it shows "Searching..." it lists "ABCs 123s" but later when it says "TheTvDB.com is incomplete..." it lists "ABC's & 123's". Note the apostrophes and ampersand are missing in the "Searching..." line. Maybe there's a problem with those characters? On TheTVDB, the episode is listed as "ABC's and 123's" so maybe the difference between "&" and "and" is the problem.

On the 3rd one (The View), the guide didn't have an episode name to it's pretty obvious what the problem was. I was wondering if, when you can't figure out what episode it is (missing or no match), could you go ahead and rename, copy, etc. using something like "ShowName-EpisodeName (from the guide, if any)-AirDateTime". Something like that so I could still find the show in XBMC and there would be as much information as possible in the file name so manual clean-up would be easier. Maybe it should be a configuration option to do this when you can't figure it out from the data you have.

Any other ideas?

Thanks


- outleradam - 2010-01-28 06:50

Did you download the SourceForge or the Google Code link? To be able to tell, check at the top of the mythicalLibrarian.sh file. Yesterday, I started labeling creation dates on line 2 of the code.
This is always the most up-to-date version: https://sourceforge.net/projects/mythicallibrari/files/mythicalLibrarianBeta/mythicalLibrarian.sh/download

Google code is what I consider to be the "stable" version, basically a distribution for ease of use where I set everything at defaults and make it "clean". The SourceForge one is my working copy. It's running very well and has not had any problems. I should update the google code version.

I noticed that it seems to be making folders every time for you. You should check your permissions. You can do the "quick install" from this post which should work well http://forum.xbmc.org/showpost.php?p=489246&postcount=36


I really need debug logs to do anything. You should set the loging to debug mode. I set it to disabled in the "stable version" because it recognized everything I could throw at it, but there have been a few problems since then and really, to nip all problems from this script I need help from others.


- watson540 - 2010-01-28 07:23

I need to get debug info on the process of communicating with the xbmc library..

I mean..does this add to xbmc library, so i dont have to go into file view to get to my mythbackend recorded episodes?

everything else works, but no sign of anything on the xbox..and nothing in the debug log

EDIT:I downloaded the latest version from yourl ink above because I noticed it was no longer naming correctly even

As I was setting it all up..I noticed on about half of the pathnames in the config half quotations around them and the other half dont..so which is it?? I added the quotes..though it didnt seem to make a difference either way

here is a log to show you whats up
Code:
###################DEBUG MODE ENABLED####################
LISTING INTERNAL VARIABLES USED BY mythicalLibrarian.
INTERNET TIMEOUT:50- TVDB API KEY:6DF511BB2A64E0E9- mythicalLibrarian WORKING DIR:/home/mythtv/mythicalLibrarian-
MOVE DIR:/mnt/extra/episodes- USING SHOWNAME AS FOLDER:Disabled-
FAILSAFE MODE:Enabled- FAILSAFE DIR:/mnt/ntfs/episodes- ALTERNATE MOVE DIR:/mnt/ntfs/episodes-
USE ORIGINAL DIR:Disabled NOTIFICATIONS:Enabled DEBUG MODE:Enabled-
INPUT SHOW NAME:Family Guy- LOCAL SHOW NAME TRANSLATION:- ShowName:Family Guy
SENT TVDB SHOW NAME:Family%20Guy-
RESOLVED SERIES ID:- RESOVED SHOW NAME:Family Guy-
INPUT EPISODE NAME:Lois Kills Stewie- ABSOLOUTE EPISODE NUMBER:Lois Kills Stewie - RESOLVED EPISODE NAME:-
SEASON:S- EPISODE:E- SYMLINK MODE:LINK- FILESIZE: 541490'kB'
CREATE AND DELETE FLAGS: ORIGINALDIR:1- FREE:73038828kB- WORKINGDIR:1 Free:2221524kB-
MOVEDIR:1- FREE:24687856kB- ALTERNATEMOVEDIR:1- FREE:73038892kB-
PRIMARYMOVIEDIRWRITABLE:1- FREE:73038892kB- ALTERNATEMOVIEDIR:1- FREE:24687856kB-
DATABASE INFORMATION
RECSTART:2010-01-27 19:00:00- MOVIE YEAR:2007- ORIGINAL SERIES DATE:2007-11-11-
PROGRAMID:EP002960010108- CHANNEL ID:1011- CATEGORY:Comedy-
EXTRAPOLATED DATA DETERMINED THIS RECORDING AS A:Series With Episode Data- STARS:0 RATING:0
ZAP2IT SERIES ID:4163209- MATCHED TVDB SERIES ID:-
####################END OF DEBUG LOG#####################
Symlink created /mnt/extra/episodes/Family Guy.SE ()-1.mpg
@@@@@@@@@@@@@OPERATION COMPLETE Thu Jan 28 00:40:45 EST 2010 @@@@@@@@@@@@@@@@
@@@@@@@@@@@NEW SEARCH INITIATED AT Thu Jan 28 00:40:48 EST 2010@@@@@@@@@@@@@
PERFORMING MAINTENANCE ROUTINE
SEARCHING: www.TheTvDb.com SHOW NAME: The Simpsons EPISODE: Kiss Kiss Bang Bangalore
FILE NAME: /mnt/ntfs/mythtv/1011_20100127183000.mpg
SEARCH FOUND:The Simpsons ID#: 71663
creating home mythicalLibrarian and log file
SEARCH FOUND:The Simpsons Shorts ID#: 79421
SEARCH FOUND: ID#:
DEFINED ABSOLOUTE EPISODE NUMBER: Kiss Kiss Bang Bangalore
###################DEBUG MODE ENABLED####################
LISTING INTERNAL VARIABLES USED BY mythicalLibrarian.
INTERNET TIMEOUT:50- TVDB API KEY:6DF511BB2A64E0E9- mythicalLibrarian WORKING DIR:/home/mythtv/mythicalLibrarian-
MOVE DIR:/mnt/extra/episodes- USING SHOWNAME AS FOLDER:Disabled-
FAILSAFE MODE:Enabled- FAILSAFE DIR:/mnt/ntfs/episodes- ALTERNATE MOVE DIR:/mnt/ntfs/episodes-
USE ORIGINAL DIR:Disabled NOTIFICATIONS:Enabled DEBUG MODE:Enabled-
INPUT SHOW NAME:The Simpsons- LOCAL SHOW NAME TRANSLATION:- ShowName:The Simpsons
SENT TVDB SHOW NAME:The%20Simpsons-
RESOLVED SERIES ID:- RESOVED SHOW NAME:The Simpsons-
INPUT EPISODE NAME:Kiss Kiss Bang Bangalore- ABSOLOUTE EPISODE NUMBER:Kiss Kiss Bang Bangalore- RESOLVED EPISODE NAME:-
SEASON:S- EPISODE:E- SYMLINK MODE:LINK- FILESIZE: 539234'kB'
CREATE AND DELETE FLAGS: ORIGINALDIR:1- FREE:73037164kB- WORKINGDIR:1 Free:2221516kB-
MOVEDIR:1- FREE:24687852kB- ALTERNATEMOVEDIR:1- FREE:73037164kB-
PRIMARYMOVIEDIRWRITABLE:1- FREE:73037164kB- ALTERNATEMOVIEDIR:1- FREE:24687852kB-
DATABASE INFORMATION
RECSTART:2010-01-27 18:30:00- MOVIE YEAR:2006- ORIGINAL SERIES DATE:2006-04-09-
PROGRAMID:EP000186930398- CHANNEL ID:1011- CATEGORY:Comedy-
EXTRAPOLATED DATA DETERMINED THIS RECORDING AS A:Series With Episode Data- STARS:0 RATING:0
ZAP2IT SERIES ID:199881155- MATCHED TVDB SERIES ID:-
####################END OF DEBUG LOG#####################
Symlink created /mnt/extra/episodes/The Simpsons.SE ()-1.mpg
@@@@@@@@@@@@@OPERATION COMPLETE Thu Jan 28 00:40:51 EST 2010 @@@@@@@@@@@@@@@@
myth watson540 #



- outleradam - 2010-01-28 07:43

You will need to edit mythicalLibrarian.sh and change your password to whatever mythtv has as a password. Mythtv states the "default" password is "MythTV" however you have other options:
mythtv uses this file for accessing the database /etc/mythtv/mysql.txt and MythTV's password for database access should be there.

you can reset the mythtv password to whatever you would like by using the method outlined here: https://help.ubuntu.com/community/MythTV/Install/Troubleshooting

you set up a root username and password when you set up mythtv

You edited your post, I thought you were talking about the mythtv database. lemme review that log.


- watson540 - 2010-01-28 07:51

no..im not referring to myths mysql database..my last post i tried to posta log but hit a limit when it said my post was 10,000 characters too long..i will try to post a more complete one here..

but im talking about the xbmc "library" ..does this script add these episodes to that or not? and why no debug info on it if so?
Code:
###################DEBUG MODE ENABLED####################                                                                                                                                                      
LISTING INTERNAL VARIABLES USED BY mythicalLibrarian.                                                                                                                                                          
INTERNET TIMEOUT:50- TVDB API KEY:6DF511BB2A64E0E9- mythicalLibrarian WORKING DIR:/home/mythtv/mythicalLibrarian-                                                                                              
MOVE DIR:/mnt/extra/episodes- USING SHOWNAME AS FOLDER:Disabled-                                                                                                                                              
FAILSAFE MODE:Enabled- FAILSAFE DIR:/mnt/ntfs/episodes- ALTERNATE MOVE DIR:/mnt/ntfs/episodes-                                                                                                                
USE ORIGINAL DIR:Disabled NOTIFICATIONS:Enabled DEBUG MODE:Enabled-                                                                                                                                            
INPUT SHOW NAME:Man vs. Wild- LOCAL SHOW NAME TRANSLATION:- ShowName:Man vs. Wild                                                                                                                              
SENT TVDB SHOW NAME:Man%20vs.%20Wild-                                                                                                                                                                          
RESOLVED SERIES ID:- RESOVED SHOW NAME:Man vs. Wild-                                                                                                                                                          
INPUT EPISODE NAME:Guatemala- ABSOLOUTE EPISODE NUMBER:Guatemala- RESOLVED EPISODE NAME:-                                                                                                                      
SEASON:S- EPISODE:E- SYMLINK MODE:LINK- FILESIZE: 1171426'kB'                                                                                                                                                  
CREATE AND DELETE FLAGS: ORIGINALDIR:1- FREE:73041068kB- WORKINGDIR:1 Free:2221540kB-                                                                                                                          
MOVEDIR:1- FREE:24687864kB- ALTERNATEMOVEDIR:1- FREE:73041068kB-                                                                                                                                              
PRIMARYMOVIEDIRWRITABLE:1- FREE:73041068kB- ALTERNATEMOVIEDIR:1- FREE:24687864kB-                                                                                                                              
DATABASE INFORMATION                                                                                                                                                                                          
RECSTART:2010-01-27 21:00:00- MOVIE YEAR:2010- ORIGINAL SERIES DATE:-                                                                                                                                        
PROGRAMID:EP008599800076- CHANNEL ID:1032- CATEGORY:Action/Adventure-                                                                                                                                        
EXTRAPOLATED DATA DETERMINED THIS RECORDING AS A:Series With Episode Data- STARS:0 RATING:0                                                                                                                  
ZAP2IT SERIES ID:20830708- MATCHED TVDB SERIES ID:-                                                                                                                                                          
####################END OF DEBUG LOG#####################                                                                                                                                                      
Symlink created /mnt/extra/episodes/Man vs Wild.SE ()-4.mpg                                                                                                                                                    
@@@@@@@@@@@@@OPERATION COMPLETE Thu Jan 28 00:40:38 EST 2010 @@@@@@@@@@@@@@@@                                                                                                                                  
@@@@@@@@@@@NEW SEARCH INITIATED AT Thu Jan 28 00:40:38 EST 2010@@@@@@@@@@@@@                                                                                                                                  
PERFORMING MAINTENANCE ROUTINE                                                                                                                                                                                
SEARCHING: www.TheTvDb.c



- watson540 - 2010-01-28 07:54

sure would help if I could get a WHOLE log on here..cant even find where to attach one

alsao meant to say..thought i did.. but notice the ending show names ..they're not right at all..something like "Family Guy (SE)"


- outleradam - 2010-01-28 07:59

NO!.. I just need a single log. Not the entire thing.

Upgrade your copy again. I take it you updated about 2 hours after I posted the link on the 24th. That problem was in the 2nd change after the "rebuild" of lost data. If this is occouring on every single episode, then you downloaded that file within a 10 minute window of me putting up a bunk version, then checking the logs and putting up another version.