X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fclient.py;h=c04f560aece84c749a839e0aade0823f47493af4;hb=80162143f725cbe604f7241e4dfc4929833470e5;hp=236ab10cbec3f1138448cf7c7e813659a735b4e9;hpb=0248e11c84a42df201feda6aa62062dc8c1df330;p=mpd-sima.git diff --git a/sima/client.py b/sima/client.py index 236ab10..c04f560 100644 --- a/sima/client.py +++ b/sima/client.py @@ -62,7 +62,7 @@ def bl_artist(func): names = list() for art in result.names: if cls.database.get_bl_artist(art, add_not=True): - cls.log.debug('Blacklisted "{0}"'.format(art)) + cls.log.debug('Blacklisted "%s"', art) continue names.append(art) if not names: @@ -339,6 +339,18 @@ class PlayerClient(Player): def state(self): return str(self.status().get('state')) + @property + def playmode(self): + plm = {'repeat': None, + 'single': None, + 'random': None, + 'consume': None, + } + for key, val in self.status().items(): + if key in plm.keys(): + plm.update({key:bool(int(val))}) + return plm + @property def current(self): return self.currentsong()