X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Flib%2Fwebserv.py;h=1f75c2000235919dd49c093be9f1a0c8bfa4ccbc;hb=65c8109daf4b649eb1573cfcff18e1f0687ae22d;hp=f72215cf60ec3e3c1746a800be6845f751663d76;hpb=5aa6ec2f4b449797fbe8269c0d8d7da66bd2c9bc;p=mpd-sima.git diff --git a/sima/lib/webserv.py b/sima/lib/webserv.py index f72215c..1f75c20 100644 --- a/sima/lib/webserv.py +++ b/sima/lib/webserv.py @@ -301,10 +301,11 @@ class WebService(Plugin): def _get_album_history(self, artist): """Retrieve album history""" - duration = self.daemon_conf.getint('sima', 'history_duration') albums_list = set() - for trk in self.sdb.get_history(artist=artist.name, duration=duration): - albums_list.add(trk[1]) + for trk in self.get_history(artist=artist.name): + if not trk.album: + continue + albums_list.add(trk.album) return albums_list def find_album(self, artists): @@ -371,6 +372,7 @@ class WebService(Plugin): titles = [t for t in self.ws.get_toptrack(artist)] except WSError as err: self.log.warning('%s: %s', self.ws.name, err) + continue for trk in titles: found = self.player.search_track(artist, trk.title) if found: