X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fplugins%2Fcore%2Fmpdoptions.py;h=47b0c042e6fcbb5fbbdf67d234aa24c08a83d2d4;hb=41e7f45be3c35a4630478211b2036ce496fdf588;hp=1c4f8529a2861c1150f9421eca8e201bc54414f6;hpb=24993cd99b847733894f57fd004ed52b5390244a;p=mpd-sima.git diff --git a/sima/plugins/core/mpdoptions.py b/sima/plugins/core/mpdoptions.py index 1c4f852..47b0c04 100644 --- a/sima/plugins/core/mpdoptions.py +++ b/sima/plugins/core/mpdoptions.py @@ -18,7 +18,7 @@ # # """ - Deal with MPD options ‑ idle and repeat mode + Deal with MPD options ‑ single and repeat mode """ # standard library import @@ -31,7 +31,7 @@ from ...lib.plugin import Plugin class MpdOptions(Plugin): """ - Deal with MPD options ‑ idle and repeat mode + Deal with MPD options - idle and repeat mode """ def __init__(self, daemon): @@ -43,12 +43,14 @@ class MpdOptions(Plugin): Called on player changes """ player = self.daemon.player - if player.status().get('single') == str(1): - self.log.info('MPD "single" mode activated.') - self.daemon.enabled = False - elif player.status().get('repeat') == str(1): - self.log.info('MPD "repeat" mode activated.') - self.daemon.enabled = False + if player.playmode.get('single'): + if self.daemon.config.getboolean('sima', 'single_disable_queue'): + self.log.info('MPD "single" mode activated.') + self.daemon.enabled = False + elif player.playmode.get('repeat'): + if self.daemon.config.getboolean('sima', 'repeat_disable_queue'): + self.log.info('MPD "repeat" mode activated.') + self.daemon.enabled = False else: if self.daemon.enabled is False: self.log.debug('enabling queuing (leaving single|repeat mode)')