Commit 11a233f4 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

Deezer: fix showing albums from search result artist entry

parent b3204675
......@@ -207,6 +207,12 @@ dist_cdpluginshra_DATA = \
src/mediaserver/cdplugins/hra/hraapi.py \
src/mediaserver/cdplugins/hra/session.py
cdpluginsdeezerdir = $(pkgdatadir)/cdplugins/deezer
dist_cdpluginsdeezer_DATA = \
src/mediaserver/cdplugins/deezer/deezer-app.py \
src/mediaserver/cdplugins/deezer/deezerapi.py \
src/mediaserver/cdplugins/deezer/deezersession.py
cdpluginsspotifydir = $(pkgdatadir)/cdplugins/spotify
dist_cdpluginsspotify_DATA = \
src/mediaserver/cdplugins/spotify/spotify-app.py \
......@@ -277,6 +283,7 @@ install-data-hook:
(cd $(DESTDIR)/$(cdpluginsspotifydir); chmod a+x spotify-app.py)
(cd $(DESTDIR)/$(cdpluginsuprcldir); chmod a+x uprcl-app.py)
(cd $(DESTDIR)/$(cdpluginshradir); chmod a+x hra-app.py)
(cd $(DESTDIR)/$(cdpluginsdeezerdir); chmod a+x deezer-app.py)
(cd $(DESTDIR)/$(radioscriptsdir);chmod a+rx . *;chmod a-x radiolist.conf)
(cd $(DESTDIR)/$(rdpl2streamdir);chmod a+x fetchStream.py)
(cd $(DESTDIR)/$(webdir)/web;chmod a+x scweb-standalone.py)
......
......@@ -193,6 +193,12 @@ class DeezerAPI(object):
data = self._api_request('user', self.user_id, 'albums')
return data
def getArtistAlbums(self, artid):
if not self.isloggedin():
return {}
data = self._api_request('artist', artid, 'albums')
return data
def getUserPlaylist(self, id):
if not self.isloggedin():
return None
......
......@@ -42,6 +42,10 @@ class Session(object):
data = self.api.getUserAlbums()
return [_parse_album(p) for p in data['data']]
def get_artist_albums(self, artid):
data = self.api.getArtistAlbums(artid)
return [_parse_album(p) for p in data['data']]
def get_user_playlist(self, id):
data = self.api.getUserPlaylist(id)
if not data:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment