38 lines
1016 B
Python
38 lines
1016 B
Python
# -*- coding: utf-8 -*-
|
|
"""Top-level package for mopidy-funkwhale."""
|
|
from __future__ import unicode_literals
|
|
|
|
import logging
|
|
import mopidy.config
|
|
import mopidy.ext
|
|
import os
|
|
|
|
|
|
__author__ = """Eliot Berriot"""
|
|
__email__ = 'contact+funkwhale@eliotberriot.com'
|
|
__version__ = '0.1.0'
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class Extension(mopidy.ext.Extension):
|
|
|
|
dist_name = 'Mopidy-Funkwhale'
|
|
ext_name = 'funkwhale'
|
|
version = __version__
|
|
|
|
def get_default_config(self):
|
|
conf_file = os.path.join(os.path.dirname(__file__), 'ext.conf')
|
|
return mopidy.config.read(conf_file)
|
|
|
|
def get_config_schema(self):
|
|
schema = super(Extension, self).get_config_schema()
|
|
schema['url'] = mopidy.config.String()
|
|
schema['username'] = mopidy.config.Secret(optional=True)
|
|
schema['password'] = mopidy.config.Secret(optional=True)
|
|
return schema
|
|
|
|
def setup(self, registry):
|
|
from .backend import FoobarBackend
|
|
registry.add('backend', FoobarBackend)
|