|
a/src/mediaserver/cdplugins/qobuz/session.py |
|
b/src/mediaserver/cdplugins/qobuz/session.py |
|
... |
|
... |
57 |
if 'artists' in data and 'items' in data['artists']:
|
57 |
if 'artists' in data and 'items' in data['artists']:
|
58 |
return [_parse_artist(art) for art in data['artists']['items']]
|
58 |
return [_parse_artist(art) for art in data['artists']['items']]
|
59 |
return []
|
59 |
return []
|
60 |
|
60 |
|
61 |
def get_featured_albums(self, genre_id=None, type='new-releases'):
|
61 |
def get_featured_albums(self, genre_id=None, type='new-releases'):
|
|
|
62 |
#uplog("get_featured_albums, genre_id %s type %s " % (genre_id, type))
|
62 |
data = self.api.album_getFeatured(type=type,
|
63 |
data = self.api.album_getFeatured(type=type,
|
63 |
genre_id=genre_id, limit=40)
|
64 |
genre_id=genre_id, limit=40)
|
64 |
if data and 'albums' in data:
|
65 |
try:
|
65 |
albums = [_parse_album(alb) for alb in data['albums']['items']]
|
66 |
albums = [_parse_album(alb) for alb in data['albums']['items']]
|
|
|
67 |
if albums:
|
66 |
return [alb for alb in albums if alb.available]
|
68 |
return [alb for alb in albums if alb.available]
|
|
|
69 |
except:
|
|
|
70 |
pass
|
67 |
return []
|
71 |
return []
|
68 |
|
72 |
|
69 |
def get_featured_playlists(self, genre_id=None):
|
73 |
def get_featured_playlists(self, genre_id=None):
|
70 |
data = self.api.playlist_getFeatured(type='editor-picks',
|
74 |
data = self.api.playlist_getFeatured(type='editor-picks',
|
71 |
genre_id=genre_id, limit=40)
|
75 |
genre_id=genre_id, limit=40)
|