From: kaliko Date: Sat, 7 Dec 2013 09:59:00 +0000 (+0100) Subject: Add sima.plugins.core name space for core plugins X-Git-Tag: mpd-sima/0.12.0pr2~18 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=39becab4a5cf591b1833e875c06793d97ac78659;p=mpd-sima.git Add sima.plugins.core name space for core plugins --- diff --git a/doc/examples/all_settings.cfg b/doc/examples/all_settings.cfg index ab6609f..ca097ab 100644 --- a/doc/examples/all_settings.cfg +++ b/doc/examples/all_settings.cfg @@ -16,9 +16,6 @@ # ######################################################################## -# -####################################################################### - ########################## MPD SECTION ################################ # [MPD] @@ -59,7 +56,6 @@ port = 6600 verbosity = info ## - # ####################################################################### @@ -75,6 +71,9 @@ key = Value # Leave commented to keep all tracks #consume = 10 +[crop] +consume = 10 + [RandomFallback] # random falvour : # * pure: complete ramdom choice among all tracks available in the player media library diff --git a/launch b/launch index a4eb951..3e88542 100755 --- a/launch +++ b/launch @@ -21,6 +21,9 @@ from sima.lib.simadb import SimaDB from sima.utils.config import ConfMan from sima.utils.startopt import StartOpt from sima.utils.utils import exception_log + # core plugins +from sima.plugins.core.history import History +from sima.plugins.core.mpdoptions import MpdOptions ## @@ -83,6 +86,10 @@ def main(): logger.info('Starting...') sima = core.Sima(config) + # core plugins + sima.register_plugin(History) + sima.register_plugin(MpdOptions) + # Loading internal plugins load_plugins(sima, 'internal') diff --git a/sima/plugins/core/__init__.py b/sima/plugins/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sima/plugins/internal/history.py b/sima/plugins/core/history.py similarity index 100% rename from sima/plugins/internal/history.py rename to sima/plugins/core/history.py diff --git a/sima/plugins/internal/mpdoptions.py b/sima/plugins/core/mpdoptions.py similarity index 100% rename from sima/plugins/internal/mpdoptions.py rename to sima/plugins/core/mpdoptions.py diff --git a/sima/utils/config.py b/sima/utils/config.py index 46bddf6..37c662b 100644 --- a/sima/utils/config.py +++ b/sima/utils/config.py @@ -46,7 +46,7 @@ DEFAULT_CONF = { 'port': "6600", }, 'sima': { - 'internal': "Crop, History, MpdOptions, Lastfm, RandomFallBack", + 'internal': "Crop, Lastfm, RandomFallBack", 'contrib': "", 'user_db': "false", 'history_duration': "8",