|
@@ -1,27 +0,0 @@
|
|
|
-import pkg_resources
|
|
|
|
|
-from mopidy import ext, config
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-class Extension(ext.Extension):
|
|
|
|
|
- dist_name = "Mopidy-SmartPlaylists"
|
|
|
|
|
- ext_name = "smartplaylists"
|
|
|
|
|
- version = "0.1.0"
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-def get_default_config(self):
|
|
|
|
|
- return config.read(pkg_resources.resource_filename(__name__, "ext.conf"))
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-def get_config_schema(self):
|
|
|
|
|
- schema = super().get_config_schema()
|
|
|
|
|
- schema["music_directory"] = config.Path()
|
|
|
|
|
- schema["scan_extensions"] = config.String(optional=True)
|
|
|
|
|
- schema["genres"] = config.String(optional=True)
|
|
|
|
|
- schema["max_tracks"] = config.Integer(optional=True)
|
|
|
|
|
- schema["case_insensitive"] = config.Boolean(optional=True)
|
|
|
|
|
- return schema
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-def setup(self, registry):
|
|
|
|
|
- from .backend import SmartPlaylistsBackend
|
|
|
|
|
- registry.add("backend", SmartPlaylistsBackend)
|
|
|