]> kaliko git repositories - mpd-sima.git/commitdiff
More robust client2client discovery GrooveBasin
authorkaliko <kaliko@azylum.org>
Tue, 3 Feb 2015 13:59:35 +0000 (14:59 +0100)
committerkaliko <kaliko@azylum.org>
Tue, 3 Feb 2015 13:59:35 +0000 (14:59 +0100)
sima/plugins/core/uniq.py

index 17b17e2487cbe3377301a24d92a29ba2fd5f2cd9..1abdd62a8f492ee805f53f877afc4d34567f80ba 100644 (file)
@@ -52,11 +52,11 @@ class Uniq(Plugin):
         self.sub_chan()
 
     def is_capable(self):
-        if 'channels' in self.player.commands():
-            if 'subscribe' in self.player.commands(): # Groove Basin compatibility
-                # For some reason Groove Basin have channels command but no
-                # subscribe command‽
-                return True
+        if {'channels', 'subscribe'}.issubset(set(self.player.commands())):
+            # Groove Basin compatibility
+            # For some reason Groove Basin have channels command but no
+            # subscribe command‽
+            return True
 
     def get_channels(self):
         return [chan for chan in self.player.channels() if