]> kaliko git repositories - mpd-sima.git/blobdiff - sima/lib/webserv.py
Fixed code smell in webserv/find_top
[mpd-sima.git] / sima / lib / webserv.py
index f72215cf60ec3e3c1746a800be6845f751663d76..078f61d158bfb302ad5d8eb0aceab0239c24303c 100644 (file)
@@ -301,9 +301,8 @@ 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):
+        for trk in self.get_history(artist=artist.name):
             albums_list.add(trk[1])
         return albums_list
 
@@ -371,6 +370,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: