]> kaliko git repositories - mpd-sima.git/blobdiff - sima/plugins/core/uniq.py
Fixed bad pid in Uniq core plugin (closes #32)
[mpd-sima.git] / sima / plugins / core / uniq.py
index 60d1680ed174862817bdf830831ab9462d448eb1..bc2ef547c41bfe7e5b6f2dc86ec8fecb3f29b97f 100644 (file)
@@ -41,7 +41,7 @@ class Uniq(Plugin):
 
     def __init__(self, daemon):
         Plugin.__init__(self, daemon)
-        self.chan = 'mpd_sima:{0}.{1}'.format(getfqdn(), getpid())
+        self.chan = None
         self.channels = []
         self._registred = False
 
@@ -70,6 +70,7 @@ class Uniq(Plugin):
             self.log.warning(' '.join(channels))
 
     def sub_chan(self):
+        self.chan = 'mpd_sima:{0}.{1}'.format(getfqdn(), getpid())
         self.log.debug('Registering as %s', self.chan)
         try:
             self.player.subscribe(self.chan)