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)



- outleradam - 2010-03-22 03:00

the --doover itself cannot get stuck in a loop. It runs a file which first deletes itself and then continues on it's course and rebuilds itself. There is no way for it to loop. It looks like the same files have been run multiple times on your system. You may want to do a --undo and then a --scan I can't explain what's going on in that paste, it looks corrupted for some reason.

it should look like this
test ...
test ...
mythicalLibrarian ...

I see several mythicalLibrarians in a row for the same file. Please run --undo and then --scan mpg "/path/to/recordings"


- outleradam - 2010-03-22 03:06

if everything is as it should be, then you can just delete --doover instead of running --undo.


- GregoryK - 2010-03-22 03:18

OK,

re-ran --update just to make sure I was on svn 299. Check.

Ran --undo;

Ran --scan on all 3 of my storage directories. Here's the pastebin: http://pastebin.com/xvAwqRfK

Still getting some permissions errors with Sports; here's a pastebin of the ls -al of the Episodes directories: http://pastebin.com/AhSFEAsa

Not sure where the problems lie, but wanted you to have this info in case it helps troubleshoot.

/Greg


- Lepy - 2010-03-22 03:58

That is almost what I'm looking for. Calling ffmpeg after the scan would work except 1.) wouldn't I have to convert every show in my library? and 2.) none of the files have the commercials cut out which ffmpeg can't do by itself.

Some episodes have a cut list I edited in the mythfrontend while others only have the mythcommflag data, but all links in the Episode folder made by the librarian also have a correponding .txt file listing cut points.

I like to use nuvexport to save space, and while it can output a filename using many database parameters (Title, Subtitle, Description, etc, by way of mythrename.pl...I think), it has no season or episode tag making it xbmc/scraper unfriendly. It even has an original air date tag...but many of the recordings lack this information unfortunately. Its ok for a random show or movie, but I don't want to manually season and episode tag 148 different recordings!

I was hoping that your program would not only change the file name of a recording but also change the title in the database to include the SXXEXX...or something along those lines, so to be able to interface with nuvexport.

nuvexport loads MythTV recording info from the database and allows you to easily pick multiple recording to be exported to a different format while honoring myths commercial cut list.

Trying to manually run nuvexport gives a database error:
Code:
xbmc@xbmc:/video/media/Episodes$ nuvexport-xvid --nice 19 --input=Good\ Eats\ S01E08\ \(Gravy\ Confidential\).mpg
Loading MythTV recording info.
98%
Input filename does not match the MythTV recording name format
and no matching file could be found in the MythTV database.
Please reference only files in your active MythTV video directory.

Cleaning up temp files.
xbmc@xbmc:/video/media/Episodes$

This link explains what is going on in the background: https://svn.forevermore.net/nuvexport/wiki/debug

Getting a little off topic, I know, but I'm not too sure where to go from here. mythicalLibrarian is doing exactly what I want it to do, I just need to figure out the best way to cut and convert the renamed files Oo


- outleradam - 2010-03-22 06:04

^^mythcialLibrarian has already "exported" your files. mythtv does not recognize the newly named file, only the symlink in place of the original file. If nuv can follow hyperlinks like mythtv, then it should work if you select the original file. If it does not, then place a report to the devs at the nuv site to follow symlinks like mythtv does.

For now mythicalLibrarian will not edit the MythTV DB except to add it's user job or to delete entries from the mythtvdb upon request. Other then that, the symlink to the new file in place of the old file takes care of the rest.

I don't really think I can do much to help on this. mythicalLibrarian maintains consistency and readability between mythtv, XBMC, the mythtvDB and the files. I don't know about this third party tool.


GregoryK Wrote:OK,

re-ran --update just to make sure I was on svn 299. Check.

Ran --undo;

Ran --scan on all 3 of my storage directories. Here's the pastebin: http://pastebin.com/xvAwqRfK

Still getting some permissions errors with Sports; here's a pastebin of the ls -al of the Episodes directories: http://pastebin.com/AhSFEAsa

Not sure where the problems lie, but wanted you to have this info in case it helps troubleshoot.

/Greg
Thanks. I will see what I can do about these problems. I will try to see what I can do tomorrow after work.

I'm committing changes right now to fix problems with thetvdb time server errors I found in your logs.


- outleradam - 2010-03-22 16:50

Greg, after looking at your issues, I can see that the problem lies in the nfo files being under the wrong user. I will try to find a work around, however a quick fix would be to undo then chown -R your recordings dir and/or clean it out. It appears the nfo files are owned by a user who does not share your permissions. They must be chown'd or rm'd. I will add checks for that.


- GregoryK - 2010-03-22 18:25

Adam:

I'm still not sure where the permissions issue is coming from. The users on the nfo files are mostly 'mythtv' with some owned by 'greg' but both 'greg' and 'mythtv' are members of the 'mythtv' group and both have rwx permissions on the nfo files. So where's the problem cropping up? And who should I chown the files to?

Just for clarity, when I run --setup and when I run mythicalLibrarian from the command line (e.g. --scan, --doover), I do so as 'greg'. When mythtv runs it as a User Job, it is run as 'mythtv'. When I run XBMC on my system, it is run as 'greg'.

Thanks again for your help and skills (and patience!)

/Greg


- outleradam - 2010-03-22 19:43

can you give me an "ls -l" in the folder which contains the cycling shows in question? This should reveal something.


- outleradam - 2010-03-22 19:53

Lepy Wrote:That is almost what I'm looking for. Calling ffmpeg after the scan would work except 1.) wouldn't I have to convert every show in my library? and 2.) none of the files have the commercials cut out which ffmpeg can't do by itself.

Some episodes have a cut list I edited in the mythfrontend while others only have the mythcommflag data, but all links in the Episode folder made by the librarian also have a correponding .txt file listing cut points.

I like to use nuvexport to save space, and while it can output a filename using many database parameters (Title, Subtitle, Description, etc, by way of mythrename.pl...I think), it has no season or episode tag making it xbmc/scraper unfriendly. It even has an original air date tag...but many of the recordings lack this information unfortunately. Its ok for a random show or movie, but I don't want to manually season and episode tag 148 different recordings!

I was hoping that your program would not only change the file name of a recording but also change the title in the database to include the SXXEXX...or something along those lines, so to be able to interface with nuvexport.

nuvexport loads MythTV recording info from the database and allows you to easily pick multiple recording to be exported to a different format while honoring myths commercial cut list.

Trying to manually run nuvexport gives a database error:
Code:
xbmc@xbmc:/video/media/Episodes$ nuvexport-xvid --nice 19 --input=Good\ Eats\ S01E08\ \(Gravy\ Confidential\).mpg
Loading MythTV recording info.
98%
Input filename does not match the MythTV recording name format
and no matching file could be found in the MythTV database.
Please reference only files in your active MythTV video directory.

Cleaning up temp files.
xbmc@xbmc:/video/media/Episodes$

This link explains what is going on in the background: https://svn.forevermore.net/nuvexport/wiki/debug

Getting a little off topic, I know, but I'm not too sure where to go from here. mythicalLibrarian is doing exactly what I want it to do, I just need to figure out the best way to cut and convert the renamed files Oo

on seccond though...

something like this may work for you

Code:
ls -1 /full/path/to/folder/containing/files/*.mpg > ./myls.txt
while read line
do
nuvexport --parameters --input="$line"
done < ./myls.txt



- GregoryK - 2010-03-22 20:25

outleradam Wrote:can you give me an "ls -l" in the folder which contains the cycling shows in question? This should reveal something.

Here you go: http://pastebin.com/hYS7hZDC

(There are a bunch of duplicates and orphans in there, you'll see. Any pointers on what's OK to erase and what's best to keep are appreciated.)

/Greg