From: kaliko Date: Fri, 19 Feb 2021 17:38:44 +0000 (+0100) Subject: Fixed previous commit, cannot apply shuffle on MetaContainer X-Git-Tag: 0.17.0~18 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=5595804ad7bc2eeb15db93efc129bf21d9a3cc77;p=mpd-sima.git Fixed previous commit, cannot apply shuffle on MetaContainer --- diff --git a/sima/plugins/internal/tags.py b/sima/plugins/internal/tags.py index 3b7ffb0..01a3125 100644 --- a/sima/plugins/internal/tags.py +++ b/sima/plugins/internal/tags.py @@ -115,8 +115,9 @@ class Tags(AdvancedPlugin): queue_mode = self.plugin_conf.get('queue_mode', 'track') target = self.plugin_conf.getint(f'{queue_mode}_to_add') # look for artists acording to filter - artists = MetaContainer([Artist(name=a) for a in self.player.list('artist', self.mpd_filter)]) + artists = [Artist(name=a) for a in self.player.list('artist', self.mpd_filter)] random.shuffle(artists) + artists = MetaContainer(artists) if not artists: self.log.info('Tags plugin found nothing to queue') return candidates