Пример #1
0
 def create_cover_pixbuf(self):    
     cover_path = DoubanCover.get_cover(self.chl, try_web=False)
     if cover_path:
         try:
             self.pixbuf = gtk.gdk.pixbuf_new_from_file(cover_path)
             self.is_loaded_cover = True                
         except gobject.GError:    
             self.pixbuf = app_theme.get_pixbuf("radio/default_cover.png").get_pixbuf()
             self.is_loaded_cover = False
     else:    
         self.pixbuf = app_theme.get_pixbuf("radio/default_cover.png").get_pixbuf()
         self.is_loaded_cover = False
Пример #2
0
 def get_channel_cover(self, channel_info, emit_fetch=True):
     cover_path = DoubanCover.get_banner(channel_info, try_web=False)
     if cover_path:
         try:
             pixbuf = gtk.gdk.pixbuf_new_from_file(cover_path)
         except:
             return self.default_cover
         else:
             return pixbuf
     else:
         if emit_fetch:
             self.start_fetch_cover(channel_info)
         return self.default_cover
 def get_channel_cover(self, channel_info, emit_fetch=True):
     cover_path = DoubanCover.get_banner(channel_info, try_web=False)
     if cover_path:
         try:
             pixbuf = gtk.gdk.pixbuf_new_from_file(cover_path)
         except:    
             return self.default_cover
         else:
             return pixbuf
     else:
         if emit_fetch:
             self.start_fetch_cover(channel_info)
         return self.default_cover
Пример #4
0
 def create_cover_pixbuf(self):
     cover_path = DoubanCover.get_cover(self.chl, try_web=False)
     if cover_path:
         try:
             self.pixbuf = gtk.gdk.pixbuf_new_from_file(cover_path)
             self.is_loaded_cover = True
         except gobject.GError:
             self.pixbuf = app_theme.get_pixbuf(
                 "radio/default_cover.png").get_pixbuf()
             self.is_loaded_cover = False
     else:
         self.pixbuf = app_theme.get_pixbuf(
             "radio/default_cover.png").get_pixbuf()
         self.is_loaded_cover = False
Пример #5
0
 def __init__(self, channel_info):
     TreeItem.__init__(self)
     self.index = 0
     self.column_index = 0
     self.side_padding = 5
     self.normal_item_height = 55
     self.highlight_item_height = 80
     self.item_height = self.normal_item_height
     self.item_width = LIST_WIDTH
     self.is_highlight = False
     self.channel_info = channel_info
     self.icon_width = self.icon_height = 45
     cover_path = DoubanCover.get_cover(channel_info, try_web=False)
     if cover_path:
         self.normal_pixbuf = gtk.gdk.pixbuf_new_from_file(cover_path)
     else:    
         self.normal_pixbuf = app_theme.get_pixbuf("radio/default_cover.png").get_pixbuf()
     self.update_size()    
     
     self.animation_cache_pixbuf = CachePixbuf()
     self.animation_timeout = 100 # s
     self.animation_id = None
     self.active_size = 45
Пример #6
0
    def __init__(self, channel_info):
        TreeItem.__init__(self)
        self.index = 0
        self.column_index = 0
        self.side_padding = 5
        self.normal_item_height = 55
        self.highlight_item_height = 80
        self.item_height = self.normal_item_height
        self.item_width = LIST_WIDTH
        self.is_highlight = False
        self.channel_info = channel_info
        self.icon_width = self.icon_height = 45
        cover_path = DoubanCover.get_cover(channel_info, try_web=False)
        if cover_path:
            self.normal_pixbuf = gtk.gdk.pixbuf_new_from_file(cover_path)
        else:
            self.normal_pixbuf = app_theme.get_pixbuf(
                "radio/default_cover.png").get_pixbuf()
        self.update_size()

        self.animation_cache_pixbuf = CachePixbuf()
        self.animation_timeout = 100  # s
        self.animation_id = None
        self.active_size = 45
Пример #7
0
 def fetch_channel_cover(self, channel_info):
     cover_path = DoubanCover.get_banner(channel_info, try_web=True)
     if cover_path:
         self.update_channel_cover(channel_info)
Пример #8
0
 def start_mission(self):
     cover_path = DoubanCover.get_cover(self.chl, try_web=True)
     if cover_path:
         self.delay_render_cover(cover_path)
Пример #9
0
 def start_mission(self):    
     cover_path = DoubanCover.get_cover(self.chl,try_web=True)
     if cover_path:
         self.delay_render_cover(cover_path)
 def fetch_channel_cover(self, channel_info):    
     cover_path = DoubanCover.get_banner(channel_info, try_web=True)
     if cover_path:
         self.update_channel_cover(channel_info)