Beispiel #1
0
 def _browse_artist(self, uri):
     refs = []
     for album in self._get_artist_albums(uri):
         refs.append(album_to_ref(album))
         refs.sort(key=lambda ref: ref.name)
     if len(refs) > 0:
         refs.insert(0, Ref.directory(uri=uri + ':all', name='All Tracks'))
         return refs
     else:
         # Show all tracks if no album is available
         return self._browse_artist_all_tracks(uri)
Beispiel #2
0
 def _browse_artist(self, uri):
     refs = []
     for album in self._get_artist_albums(uri):
         refs.append(album_to_ref(album))
         refs.sort(key=lambda ref: ref.name)
     if len(refs) > 0:
         refs.insert(0, Ref.directory(uri=uri + ':all', name='All Tracks'))
         is_all_access = uri.startswith('gmusic:artist:A')
         if is_all_access:
             refs.insert(1, Ref.directory(uri=uri + ':top', name='Top Tracks'))
         return refs
     else:
         # Show all tracks if no album is available
         return self._browse_artist_all_tracks(uri)
Beispiel #3
0
 def _browse_artist(self, uri):
     refs = []
     for album in self._get_artist_albums(uri):
         refs.append(album_to_ref(album))
         refs.sort(key=lambda ref: ref.name)
     if len(refs) > 0:
         refs.insert(0, Ref.directory(uri=uri + ':all', name='All Tracks'))
         is_all_access = uri.startswith('gmusic:artist:A')
         if is_all_access:
             refs.insert(1,
                         Ref.directory(uri=uri + ':top', name='Top Tracks'))
         return refs
     else:
         # Show all tracks if no album is available
         return self._browse_artist_all_tracks(uri)
Beispiel #4
0
 def _browse_albums(self):
     refs = []
     for album in self.albums.values():
         refs.append(album_to_ref(album))
     refs.sort(key=lambda ref: ref.name)
     return refs
Beispiel #5
0
 def _browse_albums(self):
     refs = []
     for album in self.albums.values():
         refs.append(album_to_ref(album))
     refs.sort(key=lambda ref: ref.name)
     return refs