]> kaliko git repositories - mpd-sima.git/commitdiff
Fixed wrong use of musicpd for tagtypes command (Closes #60)
authorkaliko <kaliko@azylum.org>
Tue, 16 Nov 2021 13:32:18 +0000 (14:32 +0100)
committerkaliko <kaliko@azylum.org>
Tue, 16 Nov 2021 13:32:18 +0000 (14:32 +0100)
sima/mpdclient.py

index 6bbe63dd7b97816a4ccd52cbdcef3efa795c3d99..0e7988b10f49b705ce14daa15334b7d27f680816 100644 (file)
@@ -162,9 +162,9 @@ class MPD(MPDClient):
             if cmd not in available_cmd:
                 self.disconnect()
                 raise PlayerError(f'Could connect to "{host}", but command "{cmd}" not available')
-        self.tagtypes('clear')
+        self.tagtypes_clear()
         for tag in MPD.needed_tags:
-            self.tagtypes('enable', tag)
+            self.tagtypes_enable(tag)
         ltt = set(map(str.lower, self.tagtypes()))
         needed_tags = set(map(str.lower, MPD.needed_tags))
         if len(needed_tags & ltt) != len(MPD.needed_tags):
@@ -172,7 +172,7 @@ class MPD(MPDClient):
             self.log.warning('Tags needed: %s', needed_tags)
             raise PlayerError('Missing mandatory metadata!')
         for tag in MPD.needed_mbid_tags:
-            self.tagtypes('enable', tag)
+            self.tagtypes_enable(tag)
         # Controls use of MusicBrainzIdentifier
         if self.config.getboolean('sima', 'musicbrainzid'):
             ltt = set(self.tagtypes())