def _browse_artist_all_tracks(self, uri): artist_uri = ':'.join(uri.split(':')[:3]) refs = [] tracks = self._lookup_artist(artist_uri, True) for track in tracks: refs.append(track_to_ref(track)) return refs
def _browse_tracks(self): tracks = list(self.tracks.values()) tracks.sort(key=lambda ref: ref.name) refs = [] for track in tracks: refs.append(track_to_ref(track)) return refs
def _browse_artist_top_tracks(self, uri): artist_uri = ':'.join(uri.split(':')[:3]) refs = [] tracks = self._get_artist_top_tracks(artist_uri) for track in tracks: refs.append(track_to_ref(track)) return refs
def _browse_radio_station(self, uri): station_id = uri.split(':')[2] tracks = self.backend.session.get_station_tracks( station_id, self._radio_tracks_count) # create Ref objects refs = [] for track in tracks: mopidy_track = self._to_mopidy_track(track) self.aa_tracks[mopidy_track.uri] = mopidy_track refs.append(track_to_ref(mopidy_track)) return refs
def _browse_album(self, uri): refs = [] for track in self._lookup_album(uri): refs.append(track_to_ref(track, True)) return refs