Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I deemed it better to make core an extension (that cannot be disabled) rather than add a special case throughout the config handling to make it possible to have config section that doesn't belong to an extension. This change is needed for #997. Until #997 is completed, Mopidy will complain that core has now config schema (because it is empty) and claim that core is disabled. This of course has no practical effects.
- Loading branch information
Showing
4 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[core] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
import os | ||
|
||
import mopidy | ||
from mopidy import config, ext | ||
|
||
|
||
class Extension(ext.Extension): | ||
|
||
dist_name = 'Mopidy-Core' | ||
ext_name = 'core' | ||
version = mopidy.__version__ | ||
|
||
def get_default_config(self): | ||
conf_file = os.path.join(os.path.dirname(__file__), 'ext.conf') | ||
return config.read(conf_file) | ||
|
||
def get_config_schema(self): | ||
schema = super(Extension, self).get_config_schema() | ||
del schema['enabled'] # core cannot be disabled | ||
return schema | ||
|
||
def setup(self, registry): | ||
pass # core has nothing to register |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters