__init__.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. from __future__ import unicode_literals
  2. import logging
  3. import os
  4. # TODO: Remove entirely if you don't register GStreamer elements below
  5. import pygst
  6. pygst.require('0.10')
  7. import gst
  8. import gobject
  9. from mopidy import config, ext
  10. __version__ = '0.1.0'
  11. # TODO: If you need to log, use loggers named after the current Python module
  12. logger = logging.getLogger(__name__)
  13. class Extension(ext.Extension):
  14. dist_name = 'Mopidy-Touchscreen'
  15. ext_name = 'touchscreen'
  16. version = __version__
  17. def get_default_config(self):
  18. conf_file = os.path.join(os.path.dirname(__file__), 'ext.conf')
  19. return config.read(conf_file)
  20. def get_config_schema(self):
  21. schema = super(Extension, self).get_config_schema()
  22. # TODO: Comment in and edit, or remove entirely
  23. #schema['username'] = config.String()
  24. #schema['password'] = config.Secret()
  25. return schema
  26. def setup(self, registry):
  27. # You will typically only implement one of the following things
  28. # in a single extension.
  29. from .touch_screen import TouchScreen
  30. registry.add('frontend', TouchScreen)