From 535ca42796e2785188482e2f4ee0cf3a277f8000 Mon Sep 17 00:00:00 2001 From: kaliko Date: Tue, 29 Jun 2021 09:44:22 +0200 Subject: [PATCH] Fixed crash when player.search_track returns nothing --- sima/lib/webserv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.5