pyTivo Discussion Forum Forum Index pyTivo Discussion Forum
Answers and the development of pyTivo a TiVo transcoding server
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

gmd's python metadata generator
Goto page 1, 2, 3 ... 18, 19, 20  Next
 
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> Other Apps
 View previous topic :: View next topic  
Author Message
wmcbrine



Joined: 04 Jan 2008
Posts: 2299
Location: Maryland

PostPosted: Sun Jan 06, 2008 10:30 am    Post subject: gmd's python metadata generator Reply with quote

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
View user's profile Send private message Visit poster's website
gmd



Joined: 08 Jan 2008
Posts: 31

PostPosted: Tue Jan 08, 2008 8:27 pm    Post subject: new version of pyTivoMetaThis Reply with quote

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
View user's profile Send private message
philhu



Joined: 04 Jan 2008
Posts: 593

PostPosted: Fri Feb 22, 2008 10:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
krkeegan
Site Admin


Joined: 04 Jan 2008
Posts: 458
Location: Los Angeles, CA

PostPosted: Fri Feb 22, 2008 11:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
philhu



Joined: 04 Jan 2008
Posts: 593

PostPosted: Sat Feb 23, 2008 12:24 am    Post subject: Reply with quote

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? Smile

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
View user's profile Send private message
philhu



Joined: 04 Jan 2008
Posts: 593

PostPosted: Sat Feb 23, 2008 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
gmd



Joined: 08 Jan 2008
Posts: 31

PostPosted: Sat Feb 23, 2008 7:07 pm    Post subject: pyTivoMetaThis updates Reply with quote

http://trac.kurai.org/ has the latest version
Back to top
View user's profile Send private message
philhu



Joined: 04 Jan 2008
Posts: 593

PostPosted: Sun Feb 24, 2008 3:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
gmd



Joined: 08 Jan 2008
Posts: 31

PostPosted: Sun Feb 24, 2008 7:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
gmd



Joined: 08 Jan 2008
Posts: 31

PostPosted: Sun Feb 24, 2008 8:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
tlc



Joined: 06 Jan 2008
Posts: 21

PostPosted: Mon Feb 25, 2008 4:09 am    Post subject: Reply with quote

any thoughts of expanding this to support movies too?
Back to top
View user's profile Send private message
gmd



Joined: 08 Jan 2008
Posts: 31

PostPosted: Mon Feb 25, 2008 3:14 pm    Post subject: Reply with quote

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 Sad 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
View user's profile Send private message
gmd



Joined: 08 Jan 2008
Posts: 31

PostPosted: Tue Feb 26, 2008 3:07 am    Post subject: Now with movie lookup Reply with quote

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
View user's profile Send private message
tlc



Joined: 06 Jan 2008
Posts: 21

PostPosted: Fri Feb 29, 2008 11:43 pm    Post subject: minor bug, patch Reply with quote

Some of my pyTivoMetaThis output files had carriage returns in the description field. A patch is attached.

-tlc



patch.txt
 Description:
patch

Download
 Filename:  patch.txt
 Filesize:  687 Bytes
 Downloaded:  198 Time(s)

Back to top
View user's profile Send private message
philhu



Joined: 04 Jan 2008
Posts: 593

PostPosted: Sat Mar 01, 2008 10:50 pm    Post subject: Re: pyTivoMetaThis updates Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> Other Apps All times are GMT
Goto page 1, 2, 3 ... 18, 19, 20  Next
Page 1 of 20

 
Jump to:  
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
Site is in NO WAY affiliated with TiVo Inc

Powered by phpBB © 2001, 2005 phpBB Group
phpBB SEO

Get pytivo at SourceForge.net. Fast, secure and Free Open Source software downloads
[ Time: 0.2917s ][ Queries: 19 (0.0228s) ][ GZIP on - Debug on ]