[mythtv-commits] Ticket #2734: scripts for fetching metadata for video files automatically
MythTV
mythtv at cvs.mythtv.org
Mon Mar 12 23:43:39 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 anonymous):
I found a solution for my errors, but I've never programmed in python
before, so I'm not sure what the best solution would be. The important
thing is that it works for me. It turned out that there were actually two
separate issues.
The first one was the warnings caused by a lack of a default for some of
the fields in the videometadata table. I just used sql to alter the table
to give every field a default and the warnings went away. I'm guessing the
only reason I even encountered these warnings is because I'm working
entirely from the command line and hadn't initialized the table by
visiting the module with the frontend.
The second was an error that caused the script to die any time it came
across a mailto link on the movie posters site. I guess this is primarily
an issue for TV shows, and possibly only shows who haven't released any
DVD's yet. A simple if statement tested for a mailto and bypassed the
invalid url request. I don't know what a valid patch file should look like
so I apologize for the crude attempt below:
mythvideo/scripts/fetch_poster.py around line 123:
"""
Parses the given poster page and returns an URL pointing to the poster
image.
"""
+if poster_page_url[:6] == 'mailto':
+ return None
soup = BeautifulSoup.BeautifulSoup(urllib.urlopen(poster_page_url))
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/2734#comment:18>
MythTV <http://svn.mythtv.org/trac>
MythTV
More information about the mythtv-commits
mailing list