Update of /cvsroot/freevo/freevo/src/audio/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv12526
Modified Files:
coversearch.py
Log Message:
o Since we already load the image from the net, use that image as preview
for the selection
o Some German cds have the wrong cover image in the database. Change .01.
to .03. and it works (don't know why)
Index: coversearch.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/coversearch.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** coversearch.py 3 Jul 2003 23:08:24 -0000 1.12
--- coversearch.py 19 Jul 2003 19:18:16 -0000 1.13
***************
*** 14,17 ****
--- 14,23 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.13 2003/07/19 19:18:16 dischi
+ # o Since we already load the image from the net, use that image as preview
+ # for the selection
+ # o Some German cds have the wrong cover image in the database. Change .01.
+ # to .03. and it works (don't know why)
+ #
# Revision 1.12 2003/07/03 23:08:24 dischi
# force refresh
***************
*** 118,121 ****
--- 124,129 ----
import time
import config
+ import Image
+ import cStringIO
from gui.PopupBox import PopupBox
***************
*** 200,205 ****
m = urllib2.urlopen(cover[i].ImageUrlLarge)
if not (m.info()['Content-Length'] == '807'):
items += [ menu.MenuItem('%s' % cover[i].ProductName,
! self.cover_create, cover[i].ImageUrlLarge) ]
m.close()
else:
--- 208,215 ----
m = urllib2.urlopen(cover[i].ImageUrlLarge)
if not (m.info()['Content-Length'] == '807'):
+ image = Image.open(cStringIO.StringIO(m.read()))
items += [ menu.MenuItem('%s' % cover[i].ProductName,
! self.cover_create, cover[i].ImageUrlLarge,
! image=image) ]
m.close()
else:
***************
*** 209,216 ****
n = urllib2.urlopen(cover[i].ImageUrlMedium)
if not (n.info()['Content-Length'] == '807'):
items += [ menu.MenuItem('%s [small]' % cover[i].ProductName,
self.cover_create, cover[i].ImageUrlMedium) ]
! n.close()
!
box.destroy()
if len(items) == 1:
--- 219,239 ----
n = urllib2.urlopen(cover[i].ImageUrlMedium)
if not (n.info()['Content-Length'] == '807'):
+ image = Image.open(cStringIO.StringIO(n.read()))
items += [ menu.MenuItem('%s [small]' % cover[i].ProductName,
self.cover_create, cover[i].ImageUrlMedium) ]
! n.close()
! else:
! n.close()
! # maybe the url is wrong, try to change '.01.' to '.03.'
! print cover[i].ImageUrlLarge
! cover[i].ImageUrlLarge = cover[i].ImageUrlLarge.replace('.01.',
'.03.')
! print cover[i].ImageUrlLarge
! n = urllib2.urlopen(cover[i].ImageUrlLarge)
! if not (n.info()['Content-Length'] == '807'):
! image = Image.open(cStringIO.StringIO(n.read()))
! items += [ menu.MenuItem('%s [small]' % cover[i].ProductName,
! self.cover_create,
cover[i].ImageUrlLarge) ]
! n.close()
!
box.destroy()
if len(items) == 1:
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog