From: kaliko Date: Sun, 20 Dec 2020 17:43:46 +0000 (+0100) Subject: Remove dead clode from Tags plugin X-Git-Tag: 0.16.1~7 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=f822f2e502b8ae6b1d20cf1d17db533e09b6c0b5;p=mpd-sima.git Remove dead clode from Tags plugin --- 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')