]> kaliko git repositories - mpd-sima.git/commitdiff
Fixed previous commit, cannot apply shuffle on MetaContainer
authorkaliko <kaliko@azylum.org>
Fri, 19 Feb 2021 17:38:44 +0000 (18:38 +0100)
committerkaliko <kaliko@azylum.org>
Fri, 19 Feb 2021 17:38:44 +0000 (18:38 +0100)
sima/plugins/internal/tags.py

index 3b7ffb06a6a41422d5783aa2128864329f01f927..01a312501dbd541c6c4cb4a9363e8ef7bced210b 100644 (file)
@@ -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