stream: Define extension
This commit is contained in:
parent
d8c7b876be
commit
d65a986a56
@ -1,4 +1,10 @@
|
|||||||
"""A backend for playing music for streaming music.
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import mopidy
|
||||||
|
from mopidy import ext
|
||||||
|
|
||||||
|
|
||||||
|
__doc__ = """A backend for playing music for streaming music.
|
||||||
|
|
||||||
This backend will handle streaming of URIs in
|
This backend will handle streaming of URIs in
|
||||||
:attr:`mopidy.settings.STREAM_PROTOCOLS` assuming the right plugins are
|
:attr:`mopidy.settings.STREAM_PROTOCOLS` assuming the right plugins are
|
||||||
@ -17,7 +23,24 @@ https://github.com/mopidy/mopidy/issues?labels=Stream+backend
|
|||||||
- :attr:`mopidy.settings.STREAM_PROTOCOLS`
|
- :attr:`mopidy.settings.STREAM_PROTOCOLS`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
# flake8: noqa
|
# TODO Move import into method when BACKENDS setting is removed
|
||||||
from .actor import StreamBackend
|
from .actor import StreamBackend
|
||||||
|
|
||||||
|
|
||||||
|
class Extension(ext.Extension):
|
||||||
|
|
||||||
|
name = 'Mopidy-Stream'
|
||||||
|
version = mopidy.__version__
|
||||||
|
|
||||||
|
def get_default_config(self):
|
||||||
|
return '[stream]'
|
||||||
|
|
||||||
|
def validate_config(self, config):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def validate_environment(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_backend_classes(self):
|
||||||
|
return [StreamBackend]
|
||||||
|
|||||||
1
setup.py
1
setup.py
@ -47,6 +47,7 @@ setup(
|
|||||||
b'mopidy.extension': [
|
b'mopidy.extension': [
|
||||||
'local = mopidy.backends.local:Extension',
|
'local = mopidy.backends.local:Extension',
|
||||||
'spotify = mopidy.backends.spotify:Extension',
|
'spotify = mopidy.backends.spotify:Extension',
|
||||||
|
'stream = mopidy.backends.stream:Extension',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user