Update of /cvsroot/freevo/freevo/src/audio/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv402

Modified Files:
        coversearch.py 
Log Message:
Fallback to medium cover if it's available, only if that too is missing, give
up.


Index: coversearch.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/coversearch.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** coversearch.py      12 Jun 2003 16:47:04 -0000      1.3
--- coversearch.py      12 Jun 2003 17:12:32 -0000      1.4
***************
*** 14,17 ****
--- 14,21 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.4  2003/06/12 17:12:32  outlyer
+ # Fallback to medium cover if it's available, only if that too is missing, give
+ # up.
+ #
  # Revision 1.3  2003/06/12 16:47:04  outlyer
  # Tried to make the Amazon search more intelligent.
***************
*** 120,129 ****
  
          for i in range(len(cover)):
              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) ]
              else:
!                 print "Image Placeholder for '%s - %s' skipped" % ( artist,album)
         
              box.destroy()
--- 124,142 ----
  
          for i in range(len(cover)):
+             print "Checking Large Cover"
              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:
!                 m.close()
!                 # see if a small one is available
!                 print "No Large Cover, Checking Small Cover..."
!                 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()




-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to