 |
pyTivo Discussion Forum Answers and the development of pyTivo a TiVo transcoding server
|
|
| Author |
Message |
wmcbrine

Joined: 04 Jan 2008 Posts: 444
|
Posted: Sun Jan 06, 2008 2:30 am Post subject: gmd's python metadata generator |
|
|
| gmd wrote: | It's not nearly as slick as the .NET version by MasterCephus, and is currently only for tv shows (using thetvdb.com) but this one will run under linux/mac/windows ... it was made to work in my environment, which is a linux fileserver with a bunch of directories, and shell scripts that run through those directories, adding metadata entries when a new file shows up.
Get it here: http://www.kurai.org/~gdunn/pyTivoMetaThis/
BSD License.
Maybe armooo will consider a contrib directory in the pyTivo package ? |
Original post here.
|
|
| Back to top |
|
 |
gmd
Joined: 08 Jan 2008 Posts: 28
|
Posted: Tue Jan 08, 2008 12:27 pm Post subject: new version of pyTivoMetaThis |
|
|
Updated to version 0.3:
| Code: | pyTivoMetaThis.py -p "/path/to/episode/directory"
|
generates metadata files for all files in the path specified with -p.
Currently needs files formatted as | Code: | SeriesName_SnnEnn_ArbitraryText.avi |
|
|
| Back to top |
|
 |
philhu
Joined: 04 Jan 2008 Posts: 121
|
Posted: Fri Feb 22, 2008 2:59 pm Post subject: |
|
|
Hi
I try to use this on windows, got the following:
C:\Program Files\TiVo>pyTivoMetaThis-0.3.py -p V:\Media_Files\TV_Underground\Dr
Vegas
Traceback (most recent call last):
File "C:\Program Files\TiVo\pyTivoMetaThis-0.3.py", line 255, in <module>
main()
File "C:\Program Files\TiVo\pyTivoMetaThis-0.3.py", line 237, in main
for filename in getfiles(options.filedir, fileExtList):
File "C:\Program Files\TiVo\pyTivoMetaThis-0.3.py", line 204, in getfiles
fileList = [os.path.normcase(f) for f in os.listdir(directory)]
WindowsError: [Error 3] The system cannot find the path specified: 'V:\\Media_Fi
les\\TV_Underground\\Dr/*.*'
Or with quotes:
C:\Program Files\TiVo>pyTivoMetaThis-0.3.py -p "V:\Media_Files\TV_Underground\Dr
Vegas"
Traceback (most recent call last):
File "C:\Program Files\TiVo\pyTivoMetaThis-0.3.py", line 255, in <module>
main()
File "C:\Program Files\TiVo\pyTivoMetaThis-0.3.py", line 245, in main
episodeInfoList = parse(getEpisodeInfoXML(MirrorURL, getSeriesId(MirrorURL,
series), season, episode)).getroot()
File "C:\Program Files\TiVo\pyTivoMetaThis-0.3.py", line 83, in getSeriesId
seriesid = series[0].findtext('id')
IndexError: list index out of range
|
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 412 Location: Los Angeles, CA
|
Posted: Fri Feb 22, 2008 3:49 pm Post subject: |
|
|
well you definitely need the quotes, the first error is because of a lack of quotes.
The second error might be caused by the source website being down?? I don't use this but that is what it looks like to me. Or the source website changed its formating.
|
|
| Back to top |
|
 |
philhu
Joined: 04 Jan 2008 Posts: 121
|
Posted: Fri Feb 22, 2008 4:24 pm Post subject: |
|
|
Well. It is on a NAS disk, with a drive letter. DIR seems to work fine, so maybe the website that it scrapes from is down or changed. I'll let the author look. GDM , where are you?
It works fine, except your program seems to not like it. I also tried it with forward slashes, and got the same error as above, so maybe the source website is broken or changed.
I am watching a show on it as we speak.
I thought I'd try it again with a trailing slash:
C:\Program Files\TiVo>pyTivoMetaThis-0.3.py -p "V:\Media_Files\TV_Underground\Dr Vegas\"
Traceback (most recent call last):
File "C:\Program Files\TiVo\pyTivoMetaThis-0.3.py", line 255, in <module>
main()
File "C:\Program Files\TiVo\pyTivoMetaThis-0.3.py", line 237, in main
for filename in getfiles(options.filedir, fileExtList):
File "C:\Program Files\TiVo\pyTivoMetaThis-0.3.py", line 204, in getfiles
fileList = [os.path.normcase(f) for f in os.listdir(directory)]
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: 'V:\\Me
iles\\TV_Underground\\Dr Vegas"/*.*'
C:\Program Files\TiVo>dir "V:\Media_Files\TV_Underground\Dr Vegas\"
Volume in drive V is video
Volume Serial Number is DB9D-04EC
Directory of V:\Media_Files\TV_Underground\Dr Vegas
01/24/2008 04:00 AM <DIR> .
02/20/2008 11:09 PM <DIR> ..
01/07/2005 12:39 PM 372,965,376 Dr.Vegas.s01e00.SCREENER-Cheetah-TV.mpg
01/06/2005 03:36 PM 367,532,032 dr.vegas.s01e01.pilot.hdtv-lol.avi
01/19/2005 10:05 AM 367,906,816 dr.vegas.s01e02.advantage.play.hdtv-lol.avi
01/16/2005 10:45 PM 367,607,808 dr.vegas.s01e03.dead.man.live.bet.hdtv-lol.avi
01/17/2005 03:10 AM 366,725,120 dr.vegas.s01e04.all.in.hdtv.repack-lol.avi
01/13/2005 08:24 PM 366,247,936 dr.vegas.s01e05.limits.hdtv-crimson.avi
02/22/2008 05:55 PM 13,824 Thumbs.db
7 File(s) 2,208,998,912 bytes
2 Dir(s) 1,778,307,649,536 bytes free
C:\Program Files\TiVo>
|
|
| Back to top |
|
 |
philhu
Joined: 04 Jan 2008 Posts: 121
|
Posted: Sat Feb 23, 2008 6:25 am Post subject: |
|
|
When you get a chance, can someone look at this program metathis?
I am trying to use it and it seems down/broken etc.
I know tvdb went thru some changes, i manually tried most of the urls and they seem to work but I don't know what they are really supposed to do.
If any of the group elders can take a quick look, I'd appreciate it.
I have 300+ directories of tv shows and manually doing each is going to take me about 80 years!
Thanks!
|
|
| Back to top |
|
 |
gmd
Joined: 08 Jan 2008 Posts: 28
|
Posted: Sat Feb 23, 2008 11:07 am Post subject: pyTivoMetaThis updates |
|
|
| http://trac.kurai.org/ has the latest version
|
|
| Back to top |
|
 |
philhu
Joined: 04 Jan 2008 Posts: 121
|
Posted: Sun Feb 24, 2008 7:22 am Post subject: |
|
|
Tried it
Went into the directory where the avi's are located and it doesnt give an error, just doesnt do anything....
It also does not seem to like DOS/Windows backslashes. I needed to change them to forward slashes in the directory requested:
V:\Media_Files\TV_Underground\Dr Vegas>"C:\Program Files\TiVo\pyTivoMetaThis-0.5.py" -p .
V:\Media_Files\TV_Underground\Dr Vegas>dir
Volume in drive V is video
Volume Serial Number is DB9D-04EC
Directory of V:\Media_Files\TV_Underground\Dr Vegas
01/24/2008 04:00 AM <DIR> .
02/20/2008 11:09 PM <DIR> ..
01/07/2005 12:39 PM 372,965,376 Dr.Vegas.s01e00.SCREENER-Cheetah-TV.mpg
01/06/2005 03:36 PM 367,532,032 dr.vegas.s01e01.pilot.hdtv-lol.avi
01/19/2005 10:05 AM 367,906,816 dr.vegas.s01e02.advantage.play.hdtv-lol.avi
01/16/2005 10:45 PM 367,607,808 dr.vegas.s01e03.dead.man.live.bet.hdtv-lol.avi
01/17/2005 03:10 AM 366,725,120 dr.vegas.s01e04.all.in.hdtv.repack-lol.avi
01/13/2005 08:24 PM 366,247,936 dr.vegas.s01e05.limits.hdtv-crimson.avi
02/22/2008 05:55 PM 13,824 Thumbs.db
7 File(s) 2,208,998,912 bytes
2 Dir(s) 1,778,227,441,664 bytes free
V:\Media_Files\TV_Underground\Dr Vegas>"C:\Program Files\TiVo\pyTivoMetaThis-0.5.py" -p "V:\Media_Files\T
V_Underground\Dr Vegas\"
Traceback (most recent call last):
File "C:\Program Files\TiVo\pyTivoMetaThis-0.5.py", line 235, in <module>
main()
File "C:\Program Files\TiVo\pyTivoMetaThis-0.5.py", line 220, in main
for filename in getfiles(options.filedir, fileExtList):
File "C:\Program Files\TiVo\pyTivoMetaThis-0.5.py", line 204, in getfiles
fileList = [os.path.normcase(f) for f in os.listdir(directory)]
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: 'V:\\Media_F
iles\\TV_Underground\\Dr Vegas"/*.*'
V:\Media_Files\TV_Underground\Dr Vegas>"C:\Program Files\TiVo\pyTivoMetaThis-0.5.py" -p "V:/Media_Files/T
V_Underground/Dr Vegas/"
V:\Media_Files\TV_Underground\Dr Vegas>dir
Volume in drive V is video
Volume Serial Number is DB9D-04EC
Directory of V:\Media_Files\TV_Underground\Dr Vegas
01/24/2008 04:00 AM <DIR> .
02/20/2008 11:09 PM <DIR> ..
01/07/2005 12:39 PM 372,965,376 Dr.Vegas.s01e00.SCREENER-Cheetah-TV.mpg
01/06/2005 03:36 PM 367,532,032 dr.vegas.s01e01.pilot.hdtv-lol.avi
01/19/2005 10:05 AM 367,906,816 dr.vegas.s01e02.advantage.play.hdtv-lol.avi
01/16/2005 10:45 PM 367,607,808 dr.vegas.s01e03.dead.man.live.bet.hdtv-lol.avi
01/17/2005 03:10 AM 366,725,120 dr.vegas.s01e04.all.in.hdtv.repack-lol.avi
01/13/2005 08:24 PM 366,247,936 dr.vegas.s01e05.limits.hdtv-crimson.avi
02/22/2008 05:55 PM 13,824 Thumbs.db
7 File(s) 2,208,998,912 bytes
2 Dir(s) 1,778,227,441,664 bytes free
V:\Media_Files\TV_Underground\Dr Vegas>
|
|
| Back to top |
|
 |
gmd
Joined: 08 Jan 2008 Posts: 28
|
Posted: Sun Feb 24, 2008 11:32 am Post subject: |
|
|
I think this is just a case problem. I look for SnnEnn, your files are named snnenn.
I'll update. Check for v0.6 later tonight.
|
|
| Back to top |
|
 |
gmd
Joined: 08 Jan 2008 Posts: 28
|
Posted: Sun Feb 24, 2008 12:00 pm Post subject: |
|
|
ok, well, version 0.7, case-insensitive comparison ... please try. If it doesn't work, post the results of
pyTivoMetaThis -d
in the directory where you keep your avis.
Thanks,
Graham
|
|
| Back to top |
|
 |
tlc
Joined: 05 Jan 2008 Posts: 13
|
Posted: Sun Feb 24, 2008 8:09 pm Post subject: |
|
|
| any thoughts of expanding this to support movies too?
|
|
| Back to top |
|
 |
gmd
Joined: 08 Jan 2008 Posts: 28
|
Posted: Mon Feb 25, 2008 7:14 am Post subject: |
|
|
Soon, I think. I just updated (added the --tidy flag) to allow for your .meta directory patch in revision 0.8.
Hmm. Might be a little trickier, the moxies-xml site is dead.
"Unfortunatly Movie-xml.com can no longer be hosted at its current location let me know if you can offer some new hosting on the forums."
Edit:
the imdbpy module will provide the search capabilities, but I'm really wondering how to get any info from the avi filenames... There are so many variations on format, it looks like I'm going to have to just take all the text up to the .avi and try that as a search. Ugly.
|
|
| Back to top |
|
 |
gmd
Joined: 08 Jan 2008 Posts: 28
|
Posted: Mon Feb 25, 2008 7:07 pm Post subject: Now with movie lookup |
|
|
| It's pretty crude, but functional on 90% of my samples... I'm using IMDBpy, so you'll have to install a python module , maybe when movies-xml.com is up and stable, that will be added.
|
|
| Back to top |
|
 |
tlc
Joined: 05 Jan 2008 Posts: 13
|
Posted: Fri Feb 29, 2008 3:43 pm Post subject: minor bug, patch |
|
|
Some of my pyTivoMetaThis output files had carriage returns in the description field. A patch is attached.
-tlc
| Description: |
|
 Download |
| Filename: |
patch.txt |
| Filesize: |
687 Bytes |
| Downloaded: |
40 Time(s) |
|
|
| Back to top |
|
 |
philhu
Joined: 04 Jan 2008 Posts: 121
|
Posted: Sat Mar 01, 2008 2:50 pm Post subject: Re: pyTivoMetaThis updates |
|
|
| gmd wrote: | http://trac.kurai.org/ has the latest version |
I am on windows...when i try to click this 0.9 version, I get a full screen with no cr/lf seperate lines, everything is a mumble.
How can I download it on windows?
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|