From: kaliko Date: Tue, 29 Jun 2021 07:44:22 +0000 (+0200) Subject: Fixed crash when player.search_track returns nothing X-Git-Tag: 0.18.0~28 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=535ca42796e2785188482e2f4ee0cf3a277f8000;p=mpd-sima.git Fixed crash when player.search_track returns nothing --- diff --git a/sima/lib/webserv.py b/sima/lib/webserv.py index a0b899a..ae540b7 100644 --- a/sima/lib/webserv.py +++ b/sima/lib/webserv.py @@ -280,7 +280,7 @@ class WebService(AdvancedPlugin): nbtracks_target = self.plugin_conf.getint('track_to_add') for artist in artists: if len(to_add) == nbtracks_target: - return to_add + break self.log.info('Looking for a top track for %s', artist) titles = deque() try: @@ -296,6 +296,7 @@ class WebService(AdvancedPlugin): if top_trk: to_add.append(top_trk) break + return to_add def _track(self): """Get some tracks for track queue mode