X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fplugins%2Fcore%2Funiq.py;h=db2caffe41172faf8a27d8750da36f721e3f0800;hb=4354c875088ac413824ad881505676de417e19bf;hp=0f42718ed992b89f8516788ea525e275269d773c;hpb=ac0d934fc127484a0ed14386e4c4ecd4f915b6ca;p=mpd-sima.git diff --git a/sima/plugins/core/uniq.py b/sima/plugins/core/uniq.py index 0f42718..db2caff 100644 --- a/sima/plugins/core/uniq.py +++ b/sima/plugins/core/uniq.py @@ -30,6 +30,7 @@ from socket import getfqdn # third parties components # local import +from ...client import PlayerError from ...lib.plugin import Plugin @@ -71,8 +72,11 @@ class Uniq(Plugin): def sub_chan(self): self.log.debug('Registering as {}'.format(self.chan)) - self.player.subscribe(self.chan) - self._registred = True + try: + self.player.subscribe(self.chan) + self._registred = True + except PlayerError as err: + self.log.error('Failed to register: %s', err) def callback_need_track(self): if self.is_capable():