Update of /cvsroot/freevo/freevo/src/audio/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv14323
Modified Files: coversearch.py Log Message: o catch all exceptions inside amazon.py o add plugin for 'dir' if album and artist are set Index: coversearch.py =================================================================== RCS file: /cvsroot/freevo/freevo/src/audio/plugins/coversearch.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** coversearch.py 3 Jan 2004 17:43:15 -0000 1.24 --- coversearch.py 16 Jan 2004 12:20:16 -0000 1.25 *************** *** 14,17 **** --- 14,21 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.25 2004/01/16 12:20:16 dischi + # o catch all exceptions inside amazon.py + # o add plugin for 'dir' if album and artist are set + # # Revision 1.24 2004/01/03 17:43:15 dischi # OVERLAY_DIR is always used *************** *** 185,188 **** --- 189,196 ---- print _( "WARNING" ) + ": " +\ _( "Unknown CD, cover searching is disabled" ) + + if item.type == 'dir' and item.getattr('album') and item.getattr('artist'): + return [ ( self.cover_search_file, _( 'Find a cover for this music' ), + 'imdb_search_or_cover_search') ] return [] *************** *** 195,204 **** box.show() ! if self.item.type == 'audio': ! album = self.item.info['album'] ! else: ! album = self.item.info['title'] ! artist = self.item.info['artist'] search_string = '%s %s' % (artist,album) --- 203,211 ---- box.show() ! album = self.item.getattr('album') ! if not album: ! album = self.item.getattr('title') ! artist = self.item.getattr('artist') search_string = '%s %s' % (artist,album) *************** *** 223,226 **** --- 230,241 ---- return + except: + box.destroy() + box = PopupBox(text=_( 'Unknown error while searching.' ) ) + box.show() + time.sleep(2) + box.destroy() + return + items = [] *************** *** 297,300 **** --- 312,317 ---- filename = '%s/mmpython/disc/%s.jpg' % (config.FREEVO_CACHEDIR, self.item.info['id']) + elif self.item.type == 'dir': + filename = os.path.join(self.item.dir, 'cover.jpg') else: filename = '%s/cover.jpg' % (os.path.dirname(self.item.filename)) *************** *** 306,313 **** fp.close() ! if self.item.type == 'audiocd': self.item.image = filename ! ! if not self.item.type == 'audiocd' and self.item.parent.type == 'dir': # set the new cover to all items self.item.parent.image = filename --- 323,329 ---- fp.close() ! if self.item.type in ('audiocd', 'dir'): self.item.image = filename ! elif self.item.parent.type == 'dir': # set the new cover to all items self.item.parent.image = filename ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Freevo-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog