From f822f2e502b8ae6b1d20cf1d17db533e09b6c0b5 Mon Sep 17 00:00:00 2001 From: kaliko Date: Sun, 20 Dec 2020 18:43:46 +0100 Subject: [PATCH] Remove dead clode from Tags plugin --- sima/plugins/internal/tags.py | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/sima/plugins/internal/tags.py b/sima/plugins/internal/tags.py index 0af81ef..949b387 100644 --- a/sima/plugins/internal/tags.py +++ b/sima/plugins/internal/tags.py @@ -110,36 +110,6 @@ class Tags(AdvancedPlugin): raise PluginException('Badly formated filter in tags plugin configuration: "%s"' % self.plugin_conf['filter']) - def callback_need_track_(self): - candidates = [] - queue_mode = self.plugin_conf.get('queue_mode', 'track') - target = self.plugin_conf.getint(f'{queue_mode}_to_add') - tracks = self.player.find(self.mpd_filter) - random.shuffle(tracks) - history = self.get_history() - while tracks: - trk = tracks.pop() - if trk in self.player.queue or \ - trk in candidates: - self.log.debug('%s already queued', trk) - continue - if trk in history: - self.log.debug('%s in history', trk) - continue - candidates.append(trk) - self.log.info('Tags candidate: {}'.format(trk)) - if len(candidates) >= target: - break - if queue_mode == 'track': - return candidates - if queue_mode == 'album': - for trk in candidates: - self.log.info(trk.Artist) - _ = self.album_candidate(trk.Artist) - if not candidates: - self.log.info('Tags plugin failed to find some tracks') - return candidates - def callback_need_track(self): candidates = [] queue_mode = self.plugin_conf.get('queue_mode', 'track') -- 2.39.5