mpd: Define extension

This commit is contained in:
Stein Magnus Jodal 2013-04-01 15:01:28 +02:00
parent d65a986a56
commit a5f3bfc9c4
2 changed files with 27 additions and 3 deletions

View File

@ -1,4 +1,10 @@
"""The MPD server frontend.
from __future__ import unicode_literals
import mopidy
from mopidy import ext
__doc__ = """The MPD server frontend.
MPD stands for Music Player Daemon. MPD is an independent project and server.
Mopidy implements the MPD protocol, and is thus compatible with clients for the
@ -44,7 +50,24 @@ near future:
- Live update of the music database is not supported
"""
from __future__ import unicode_literals
# flake8: noqa
# TODO Move import into method when FRONTENDS setting is removed
from .actor import MpdFrontend
class Extension(ext.Extension):
name = 'Mopidy-MPD'
version = mopidy.__version__
def get_default_config(self):
return '[mpd]'
def validate_config(self, config):
pass
def validate_environment(self):
pass
def get_frontend_classes(self):
return [MpdFrontend]

View File

@ -46,6 +46,7 @@ setup(
],
b'mopidy.extension': [
'local = mopidy.backends.local:Extension',
'mpd = mopidy.frontends.mpd:Extension',
'spotify = mopidy.backends.spotify:Extension',
'stream = mopidy.backends.stream:Extension',
],