| 123456789101112131415161718192021222324252627282930313233343536 |
- from __future__ import unicode_literals
- import logging
- import os
- from mopidy import config, ext
- from .touch_screen import TouchScreen
- from .touch_screen_backend import TouchScreenBackend
- __version__ = '0.1.0'
- # TODO: If you need to log, use loggers named after the current Python module
- logger = logging.getLogger(__name__)
- class Extension(ext.Extension):
- dist_name = 'Mopidy-Touchscreen'
- ext_name = 'touchscreen'
- version = __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()
- schema['screen_width'] = config.Integer()
- schema['screen_height'] = config.Integer()
- schema['cursor'] = config.Boolean()
- return schema
- def setup(self, registry):
- registry.add('frontend', TouchScreen)
- registry.add('backend', TouchScreenBackend)
|