From: kaliko Date: Thu, 31 Jan 2019 15:41:33 +0000 (+0100) Subject: Add an undocumented mopidy compatibility option X-Git-Tag: 0.15.0~1 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=refs%2Fheads%2Fmopidy;p=mpd-sima.git Add an undocumented mopidy compatibility option Use the following in the config: [sima] mopidy_compat = True --- diff --git a/doc/Changelog b/doc/Changelog index b9fc7ad..700cba1 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -8,6 +8,9 @@ MPD_sima v0.15.0 * Client side hardcoded one month caching (ugly workaround for #7) * Simplified album search * Track search aggregates artist name and MusicBrainzID searches + * Add an undocumented mopidy compatibility configuration option + Use the boolean option "mopidy_compat" in the sima section + cf. https://gitlab.com/kaliko/sima/issues/21# -- kaliko jack UNRELEASED diff --git a/sima/launch.py b/sima/launch.py index 15fca43..42869b6 100644 --- a/sima/launch.py +++ b/sima/launch.py @@ -39,7 +39,7 @@ from .lib.simadb import SimaDB from .utils.config import ConfMan from .utils.startopt import StartOpt from .utils.utils import exception_log, SigHup - # core plugins +# core plugins from .plugins.core.history import History from .plugins.core.mpdoptions import MpdOptions from .plugins.core.uniq import Uniq @@ -107,6 +107,10 @@ def start(sopt, restart=False): # required core plugins core_plugins = [History, MpdOptions, Uniq] + if config.getboolean('sima', 'mopidy_compat'): + logger.warning('Running with mopidy compat. mode!') + core_plugins = [History, MpdOptions] + config['sima']['musicbrainzid'] = 'False' for cplgn in core_plugins: logger.debug('Register core {name} ({doc})'.format(**cplgn.info())) sima.register_core_plugin(cplgn)