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

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



- iscraigh - 2010-09-13

Code:
Are your showings mixed with the Episodes

Not understanding the question?

Code:
locate tvshow
/usr/share/xbmc/web/tvshowepisodes.html
/usr/share/xbmc/web/tvshows.html
/usr/share/xbmc/web/tvshowseasons.html

don't seem to have this file

Sorry

Craig


- Nick8888 - 2010-09-13

tvshow.nfo is a file which contains information about a particular tvshow. xbmc reads them from your tv shows directory (where you place your tv shows).

It has nothing to do with what you just posted which is part of the xbmc web interface files.

If you look at the log you just posted and ctrl + f "tvshow.nfo" you will see.

eg. /home/mythtv/recordings/Showings/Glee/tvshow.nfo


- outleradam - 2010-09-13

^^ That's what it is.

iscraigh: you may want to upgrade XBMC. The problem went away a long time ago in the SVN. Dharma is comming out soon so you can grab the beta version or wait for the release.

Also, run
Code:
sudo chown -R mythtv /home/mythtv
to correct the problems created by running mythicalLibrarian on mythtv owned files as user craig.


- iscraigh - 2010-09-13

Im running the svn version from 1 week ago crystal hd now working with my myth hdpvr recordings got me looking @ your script. I will play with deleting the nfo files when i get home, thanks for your patience.

Craig


- outleradam - 2010-09-13

Once you delete the files, remove and re-add the source from XBMC to reset everything. If this problem persists, I will look at making a work around.


- outleradam - 2010-09-14

I am making a couple of changes in the SVN tonight.

1. No file naming operations will occur in move mode when using mythtv when the user running mythicalLibrarian is not "mythtv". This will be bypassable with an extra command line option.

2. Also, for mythicalSetup, if mythicalLibrarian is used with mythtv, the default permissions will be mythtv instead of username.


- outleradam - 2010-09-14

Ok, changes complete. Let me know if there are any problems. I will be committing this to stable before moving on with other mythicalLibrarian activities. Please test this new option.

Code:
root@XBMC-live:~/.mythicalLibrarian/mythicalSetup# echo woot >./test
root@XBMC-live:~/.mythicalLibrarian/mythicalSetup# chown mythtv ./test
root@XBMC-live:~/.mythicalLibrarian/mythicalSetup# mythicalLibrarian /root/.mythicalLibrarian/mythicalSetup/test "the" "the"
Revision 581 Mon Sep 13 20:45:57 CDT 2010
Accessing MythTV DataBase:
RECSTART: DATE:
PROGRAMID: ShowCategory:
PLOT:
FUZZY LOGIC SHOW NAME: The End of the Year Show ID: 70667
DATABASE IS MAINTAINED. TIME IS:1284429781 NEXT UPDATE IS:1284498368
agrep: 4 words match within 3 errors
COULD NOT MATCH AIRDATE. FUZZY LOGIC Exx NUMBER:1
TOTAL MATCHES:32 TOTAL VERIFIED FUZZY ERRORS:0
EPISODE:1998 ABSOLUTE NUMBER:1 S01E01
JOB: mythicalLibrarian '/root/.mythicalLibrarian/mythicalSetup/test' 'the' 'the'
TARGET SET:/root/.mythicalLibrarian/mythicalSetup/Episodes/The End of the Year Show/Season 1/The End of the Year Show S01E01 (1998)
FILE NAME EXISTS.  FILE WILL BE KNOWN AS: The End of the Year Show S01E01 (1998)-2
########################################################################
##############################  ERROR  #################################
########################################################################
USER NAME:root ATTEMPTED TO RENAME A MYTHTV OWNED FILE
mythicalLibrarian HAS PREVENTED THIS UNAUTHORIZED FILE ACTION
THIS IS A SAFETY FEATURE TO PRESERVE FILE PERMISSIONS.
PLEASE RUN THE FOLLOWING TO SET PROPER PERMISSIONS WHEN RENAMING FILES:
sudo su mythtv
mythicalLibrarian "/root/.mythicalLibrarian/mythicalSetup/test" "the" "the"
OR AT YOUR OWN RISK BYPASS THIS CHECK BY ADDING --BypassPermissionsCheck
AT THE END OF THE LINE YOU JUST RAN.

Done.
FILE SYSTEM ERROR:PermissionErrorWhileMoving
root@XBMC-live:~/.mythicalLibrarian/mythicalSetup#

Yeah... mythicalLibrarian even denies Root now if it is a mythtv file. Accommodations were made for --scan mode as well. It will work if you type the --scan command like normal and then just simply put --BypassPermissionsCheck at the end.

Let me know if there are any problems. People tend to either fix their problems and not tell me. need to know when an issue is no longer an issue and what resolved it, or at least what you think resolved it.


- thrasherx - 2010-09-14

Still the same problems here Sad I'll get VNC set up eventually. Thanks.


- outleradam - 2010-09-15

I have installed ubuntu server and mythtv on a virtual machine and now I must make some recordings to test and see if this could be a dependency issue.


- GregoryK - 2010-09-15

Adam: Just upgraded tonight to rev 581 and got a permissions error on my normal User Job. Looking at the output.log shows that your new permissions check kicked in, but I don't think it should have in this case.

Here's the output.log on pastebin.com

The job was run by mythtv as the myth User Job #1 so should have been owned by mythtv as well. I did nothing to change my mythicalLibrarian settings in --update, and I was running the --update as user mythtv.

Any suggestions?

Thanks,

/Greg


- outleradam - 2010-09-15

Thanks gregory, Fix committed just now, You should be good to go with the SVN.


- GregoryK - 2010-09-15

outleradam Wrote:Thanks gregory, Fix committed just now, You should be good to go with the SVN.

Fixed...thanks Adam!

/Greg

ps. I have a bunch of what look like duplicate .nfo and .txt files in some of my Showings directories. Example:

Code:
ded [email protected] on 1709)-10.nfo
-rw-r--r--  1 mythtv mythtv         71 2010-03-21 17:38 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-10.txt
-rw-r--r--  1 mythtv mythtv        285 2010-03-21 17:44 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-11.nfo
-rw-r--r--  1 mythtv mythtv         71 2010-03-21 17:44 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-11.txt
-rw-r--r--  1 mythtv mythtv        285 2010-03-21 17:48 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-12.nfo
-rw-r--r--  1 mythtv mythtv         71 2010-03-21 17:47 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-12.txt
-rw-r--r--  1 mythtv mythtv        285 2010-03-21 16:54 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-1.nfo
-rw-r--r--  1 mythtv mythtv         71 2010-03-21 16:53 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-1.txt
-rw-r--r--  1 mythtv mythtv        285 2010-03-21 17:02 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-2.nfo
-rw-r--r--  1 mythtv mythtv         71 2010-03-21 17:02 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-2.txt
-rw-r--r--  1 mythtv mythtv        285 2010-03-21 17:07 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-3.nfo
-rw-r--r--  1 mythtv mythtv         71 2010-03-21 17:07 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-3.txt
-rw-r--r--  1 mythtv mythtv        285 2010-03-21 17:11 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-4.nfo
-rw-r--r--  1 mythtv mythtv         71 2010-03-21 17:11 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-4.txt
-rw-r--r--  1 mythtv mythtv        285 2010-03-21 17:15 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-5.nfo
-rw-r--r--  1 mythtv mythtv         71 2010-03-21 17:15 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-5.txt
-rw-r--r--  1 mythtv mythtv        285 2010-03-21 17:20 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-6.nfo
-rw-r--r--  1 mythtv mythtv         71 2010-03-21 17:20 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-6.txt
-rw-r--r--  1 mythtv mythtv        285 2010-03-21 17:27 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-7.nfo
-rw-r--r--  1 mythtv mythtv         71 2010-03-21 17:26 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-7.txt
-rw-r--r--  1 mythtv mythtv        285 2010-03-21 17:29 Masterpiece Classic S0E0 (Recorded [email protected] on 1709)-8.nfo

OK to rm these .nfo and .txt files? I tried --doMaintenance but that didn't remove them.

Thanks again.

/Greg


- outleradam - 2010-09-15

Yes it is. Remember each user maintains his/her own tracking file. If Greg created the file, mythtv will not check it.

Maybe that should be globally managed.


- GregoryK - 2010-09-15

Thanks for the answer, appreciated.

Global management of the tracking file would be a nice feature/option, I think. I know that when I did my initial scans of recordings, I was logged into my default account, not the mythtv account. A few upgrades (and hardware failures) later, I don't think that that tracking file still exists in my home account.

While I'm thinking of maintenance issues, I have several recorded movies that were unrecognized by mL, placed into /Showings, but tagged as TV Shows in their .nfo files. They are no longer in the --doover queue for whatever reason (see above). So two questions: (1) would a --scan of the Showings directory possibly fix the categorization? (2) If so, should I remove the inaccurate .nfo files before doing the --scan?

Thanks again for the support.

/Greg


- outleradam - 2010-09-15

mythicalLibrarian will not delete it's tracking files for upgrade or maintenance. It will clean it's file.tracking and folder.tracking if the folders are not available when --doMaintenance is executed. However, the undo file is never touched except when --undo is run. If the --undo option does not work, then it was deleted. The tracking files are mythicalLibrarian's dewey decimal system. Try:
Code:
sudo mythicalLibrarian --undomythicalLibrarian --scan mpg /path_to/files
to undo and rescan the library which should rebuild all of the tracking files.If the doover file is missing then there is currently no way to --doover the jobs.If the undo file is missing then there is currently no way to --undo the jobs. If the files were already processed and symlinked, then --scan will not work.I will look at a total undo tonight. This would give the user the option to specify the library folder after a --undo operaton. mythicalLibrarian will look at the folder, pick out the symlinks, display the symlinks, ask the user if they are sure that they wish to undo all symlinks in this folder, then proceed with the operation. This would allow for a total undo of all mythicalLibrarian files. I think I had better move to a global tracking system in order to make this work more efficiently. After a total undo, --doover jobs --undo jobs should be deleted, assuming all library files are located in the same dir. file/folder.tracking are taken care of as usual by the maintenance routine.