Hi All,
I found there is no code to prevent the broken URL of
channel images when "Makelogos.py" (src/helpers/makelogos.py)
The original codes are:
if imgsrc != None:
# Get the file into a fp
fp = urllib2.urlopen(str(imgsrc))
# Make a seekable file object
img = cStringIO.StringIO(fp.read())
# Convert the image into a PNG and save to logos directory
output_file = config.TV_LOGOS + '/' + channel + '.png'
try: Image.open(img).save(output_file)
except IOError: pass
Here I suggest the code to take care of the broken URLs:
if imgsrc != None:
# Get the file into a fp
print "Open URL %s" % str(imgsrc)
fp = None
try:
fp = urllib2.urlopen(str(imgsrc))
except IOError: pass
if fp is not None:
# Make a seekable file object
img = cStringIO.StringIO(fp.read())
# Convert the image into a PNG and save to logos directory
output_file = config.TV_LOGOS + '/' + channel + '.png'
Image.open(img).save(output_file)
Hope this helps
Good Luck
Anthony
__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel