home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / rhythmbox / plugins / artdisplay / PodcastCoverArtSearch.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  1.6 KB  |  37 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import rhythmdb
  5.  
  6. class PodcastCoverArtSearch(object):
  7.     
  8.     def __init__(self):
  9.         self.searching = False
  10.         self.cancel = False
  11.         self.entry = None
  12.  
  13.     
  14.     def search(self, db, entry, on_search_completed_callback, *args):
  15.         self.searching = True
  16.         self.cancel = False
  17.         self.entry = entry
  18.         self.args = args
  19.         if entry.get_entry_type() != db.entry_type_get_by_name('podcast-post'):
  20.             on_search_completed_callback(self, self.entry, None, *self.args)
  21.             return None
  22.         podcast_location = db.entry_get(entry, rhythmdb.PROP_SUBTITLE)
  23.         podcast_feed_entry = db.entry_lookup_by_location(podcast_location)
  24.         image_url = db.entry_get(podcast_feed_entry, rhythmdb.PROP_IMAGE)
  25.         on_search_completed_callback(self, self.entry, image_url, *self.args)
  26.  
  27.     
  28.     def search_next(self):
  29.         return False
  30.  
  31.     
  32.     def get_best_match_urls(self, search_results):
  33.         return [
  34.             search_results]
  35.  
  36.  
  37.