def show_album_title(self, bean=None): if not bean: bean = self.bean if bean.UUID != self.bean.UUID: return """update info album and year""" info_line = bean.artist if bean.text in FCache().album_titles: info_line = FCache().album_titles[bean.text] else: album_name = self.controls.lastfm_service.get_album_name( bean.artist, bean.title) album_year = self.controls.lastfm_service.get_album_year( bean.artist, bean.title) if album_name: info_line = album_name if album_name and album_year: info_line = album_name + " (" + album_year + ")" if isinstance(info_line, str): FCache().album_titles[bean.text] = info_line if info_line and bean.UUID == self.bean.UUID: info_line = info_line.replace('&', '&') GLib.idle_add(self.album_label.set_markup, "<b>%s</b>" % info_line) GLib.idle_add(self.controls.coverlyrics.album_title.set_markup, "<b>%s</b>" % info_line)
def show_album_title(self): bean = self.bean """update info album and year""" info_line = bean.artist if FCache().album_titles.has_key(bean.text): info_line = FCache().album_titles[bean.text] else: album_name = self.controls.lastfm_service.get_album_name(bean.artist, bean.title) album_year = self.controls.lastfm_service.get_album_year(bean.artist, bean.title) if album_name: info_line = album_name if album_name and album_year: info_line = album_name + "(" + album_year + ")" if isinstance(info_line, unicode) or isinstance(info_line, str) : FCache().album_titles[bean.text] = info_line info_line.replace('&', '&') self.album_label.set_markup("<b>%s</b>" % info_line) self.controls.coverlyrics.album_title.set_markup("<b>%s</b>" % info_line)
def show_album_title(self): bean = self.bean """update info album and year""" info_line = bean.artist if FCache().album_titles.has_key(bean.text): info_line = FCache().album_titles[bean.text] else: album_name = self.controls.lastfm_service.get_album_name( bean.artist, bean.title) album_year = self.controls.lastfm_service.get_album_year( bean.artist, bean.title) if album_name: info_line = album_name if album_name and album_year: info_line = album_name + "(" + album_year + ")" if isinstance(info_line, unicode) or isinstance(info_line, str): FCache().album_titles[bean.text] = info_line info_line.replace('&', '&') self.album_label.set_markup("<b>%s</b>" % info_line) self.controls.coverlyrics.album_title.set_markup("<b>%s</b>" % info_line)
def show_album_title(self, bean=None): if not bean: bean = self.bean if bean.UUID != self.bean.UUID: return """update info album and year""" info_line = bean.artist if bean.text in FCache().album_titles: info_line = FCache().album_titles[bean.text] else: album_name = self.controls.lastfm_service.get_album_name(bean.artist, bean.title) album_year = self.controls.lastfm_service.get_album_year(bean.artist, bean.title) if album_name: info_line = album_name if album_name and album_year: info_line = album_name + " (" + album_year + ")" if isinstance(info_line, unicode) or isinstance(info_line, str): FCache().album_titles[bean.text] = info_line if info_line and bean.UUID == self.bean.UUID: info_line = info_line.replace('&', '&') GLib.idle_add(self.album_label.set_markup, "<b>%s</b>" % info_line) GLib.idle_add(self.controls.coverlyrics.album_title.set_markup, "<b>%s</b>" % info_line)