[mythtv-commits] Ticket #2734: scripts for fetching metadata for video files automatically

MythTV mythtv at cvs.mythtv.org
Mon Mar 12 22:12:53 UTC 2007


#2734: scripts for fetching metadata for video files automatically
-------------------------------------------------+--------------------------
 Reporter:  visit0r <gmail: pekka.jaaskelainen>  |        Owner:  awithers
     Type:  defect                               |       Status:  new     
 Priority:  minor                                |    Milestone:  unknown 
Component:  mythvideo                            |      Version:  0.20    
 Severity:  low                                  |   Resolution:          
-------------------------------------------------+--------------------------

Comment(by c.flakes at gmail.com):

 I ran into some errors using the script so I downloaded the most recent
 version from the trunk (13018) and I'm still seeing the following errors:

 mythtv at myth:/usr/share/mythtv/mythvideo/scripts$ ./find_meta.py -w -i -r
 /video/video_imports/
 Database connection successful.
 Scanning directory /video/video_imports/...
 Scanning directory /video/video_imports/TV Shows...
 Scanning directory /video/video_imports/TV Shows/Heroes...
 Found 1 videos.
 Scanning file Heroes s01e18 - Parasite.avi...
 Title search 'Heroes s01e18 - Parasite'
 Got multiple candidates for title search 'Heroes s01e18 - Parasite'.
 0813715) Heroes (2006)
 0802147) Heroes (2006)
 0452723) Heroes (1984)
 0291617) Heroes (1990)
 0422413) Heroes (1985)
 ?)0813715
 Chose 0813715
 Querying IMDb for meta data for ID 0813715...
 Metadata:
 Title:Heroes
 Runtime:45,60 (including commercials)
 Year:2006
 Director:Greg Beeman
 Plot:They thought they were like everyone else... until they woke with
 incredible abilities.
 Runtime:45,60 (including commercials)
 Genres:Drama,Fantasy
 Countries:USA
 IMDb:0813715

 Inserting metadata to MythDB for /video/video_imports/TV
 Shows/Heroes/Heroes s01e18 - Parasite.avi.
 No metadata in MythDB, creating a new one.
 ./find_meta.py:397: Warning: Field 'title' doesn't have a default value
   c.execute("""INSERT INTO videometadata(filename) VALUES(%s)""",
 (videopath,))
 ./find_meta.py:397: Warning: Field 'director' doesn't have a default value
   c.execute("""INSERT INTO videometadata(filename) VALUES(%s)""",
 (videopath,))
 ./find_meta.py:397: Warning: Field 'rating' doesn't have a default value
   c.execute("""INSERT INTO videometadata(filename) VALUES(%s)""",
 (videopath,))
 ./find_meta.py:397: Warning: Field 'inetref' doesn't have a default value
   c.execute("""INSERT INTO videometadata(filename) VALUES(%s)""",
 (videopath,))
 ./find_meta.py:397: Warning: Field 'year' doesn't have a default value
   c.execute("""INSERT INTO videometadata(filename) VALUES(%s)""",
 (videopath,))
 ./find_meta.py:397: Warning: Field 'userrating' doesn't have a default
 value
   c.execute("""INSERT INTO videometadata(filename) VALUES(%s)""",
 (videopath,))
 ./find_meta.py:397: Warning: Field 'length' doesn't have a default value
   c.execute("""INSERT INTO videometadata(filename) VALUES(%s)""",
 (videopath,))
 ./find_meta.py:397: Warning: Field 'showlevel' doesn't have a default
 value
   c.execute("""INSERT INTO videometadata(filename) VALUES(%s)""",
 (videopath,))
 ./find_meta.py:397: Warning: Field 'coverfile' doesn't have a default
 value
   c.execute("""INSERT INTO videometadata(filename) VALUES(%s)""",
 (videopath,))
 Traceback (most recent call last):
   File "./find_meta.py", line 947, in ?
     main()
   File "./find_meta.py", line 942, in main
     scan(path, options.imdb_id)
   File "./find_meta.py", line 850, in scan
     scan_directory(root)
   File "./find_meta.py", line 811, in scan_directory
     scan_file(video)
   File "./find_meta.py", line 776, in scan_file
     save_metadata(pathName, metadata_target, metadata)
   File "./find_meta.py", line 547, in save_metadata
     save_metadata_to_mythdb(videopath, metadata)
   File "./find_meta.py", line 316, in save_metadata_to_mythdb
     return save_video_metadata_to_mythdb(videopath, metadata)
   File "./find_meta.py", line 412, in save_video_metadata_to_mythdb
     coverfile = find_poster_image(title, inetref)
   File "./find_meta.py", line 494, in find_poster_image
     posters = fetch_poster.find_best_posters(\
   File "/usr/share/mythtv/mythvideo/scripts/fetch_poster.py", line 215, in
 find_best_posters
     new_posters = fetcher.fetch(title, imdb_id)
   File "/usr/share/mythtv/mythvideo/scripts/fetch_poster.py", line 108, in
 fetch
     image_url = self.find_poster_image_url(url)
   File "/usr/share/mythtv/mythvideo/scripts/fetch_poster.py", line 123, in
 find_poster_image_url
     soup = BeautifulSoup.BeautifulSoup(urllib.urlopen(poster_page_url))
   File "/usr/lib/python2.4/urllib.py", line 82, in urlopen
     return opener.open(url)
   File "/usr/lib/python2.4/urllib.py", line 187, in open
     return self.open_unknown(fullurl, data)
   File "/usr/lib/python2.4/urllib.py", line 199, in open_unknown
     raise IOError, ('url error', 'unknown url type', type)
 IOError: [Errno url error] unknown url type: 'mailto'

 mythtv at myth:/usr/share/mythtv/mythvideo/scripts$

 Am I using it incorrectly?

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/2734#comment:17>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list