Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
 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
Esempio n. 4
0
 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
Esempio n. 5
0
 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
Esempio n. 6
0
 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
Esempio n. 7
0
    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
Esempio n. 8
0
    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
Esempio n. 9
0
 def _browse_album(self, uri):
     refs = []
     for track in self._lookup_album(uri):
         refs.append(track_to_ref(track, True))
     return refs
Esempio n. 10
0
 def _browse_album(self, uri):
     refs = []
     for track in self._lookup_album(uri):
         refs.append(track_to_ref(track, True))
     return refs