def render(self, view_manager): if self.__loader.is_loaded(): playlist_manager = view_manager.get_var('playlist_manager') l = self.get_list(view_manager) l.reset() #Get the non-similar list, if asked to do so if self._get_similar_filter(): non_similar_list = self.__loader.get_non_similar_albums() #Set the artist name window = view_manager.get_window() window.setProperty('artistbrowse_artist_name', self.__artist.name()) #Get the album types to be shown filter_types = self._get_album_filter() #Now loop over all the loaded albums for index, album in self.__loader.get_albums(): album_type = self.__loader.get_album_type(index) is_in_filter = album_type in filter_types is_available = self.__loader.get_album_available_tracks(index) > 0 is_similar = self._get_similar_filter() and index not in non_similar_list #Discard unavailable/non-filtered/similar albums if is_available and is_in_filter and not is_similar: image_url = playlist_manager.get_image_url(album.cover()) item = xbmcgui.ListItem( album.name(), str(album.year()), image_url ) item.setProperty('ListIndex', str(index)) l.addItem(item) return True
def render(self, view_manager): if self.__search.is_loaded(): list_obj = self.get_list(view_manager) list_obj.reset() playlist_manager = view_manager.get_var('playlist_manager') for album in self.__search.albums(): item = xbmcgui.ListItem( album.name(), album.artist().name(), playlist_manager.get_image_url(album.cover())) list_obj.addItem(item) return True
def render(self, view_manager): if self.__search.is_loaded(): list_obj = self.get_list(view_manager) list_obj.reset() playlist_manager = view_manager.get_var('playlist_manager') for album in self.__search.albums(): item = xbmcgui.ListItem( album.name(), album.artist().name(), playlist_manager.get_image_url(album.cover()) ) list_obj.addItem(item) return True
def render(self, view_manager): if self.__loader.is_loaded(): playlist_manager = view_manager.get_var('playlist_manager') l = self.get_list(view_manager) l.reset() #Get the non-similar list, if asked to do so if self._get_similar_filter(): non_similar_list = self.__loader.get_non_similar_albums() #Set the artist name window = view_manager.get_window() window.setProperty('artistbrowse_artist_name', self.__artist.name()) #Get the album types to be shown filter_types = self._get_album_filter() #Now loop over all the loaded albums for index, album in self.__loader.get_albums(): album_type = self.__loader.get_album_type(index) is_in_filter = album_type in filter_types is_available = self.__loader.get_album_available_tracks( index) > 0 is_similar = self._get_similar_filter() and \ index not in non_similar_list #Discard unavailable/non-filtered/similar albums if is_available and is_in_filter and not is_similar: image_url = playlist_manager.get_image_url(album.cover()) item = xbmcgui.ListItem(album.name(), str(album.year()), image_url) item.setProperty('ListIndex', str(index)) l.addItem(item) return True