docs: Move stream to ext registry
This commit is contained in:
parent
7c01db842d
commit
8bcf1de21c
42
docs/ext/stream.rst
Normal file
42
docs/ext/stream.rst
Normal file
@ -0,0 +1,42 @@
|
||||
.. _ext-stream:
|
||||
|
||||
*************
|
||||
Mopidy-Stream
|
||||
*************
|
||||
|
||||
Extension for playing streaming music.
|
||||
|
||||
The stream backend will handle streaming of URIs matching the
|
||||
:confval:`stream/protocols` config value, assuming the needed GStreamer plugins
|
||||
are installed.
|
||||
|
||||
|
||||
Known issues
|
||||
============
|
||||
|
||||
https://github.com/mopidy/mopidy/issues?labels=Stream+backend
|
||||
|
||||
|
||||
Dependencies
|
||||
============
|
||||
|
||||
None. The extension just needs Mopidy.
|
||||
|
||||
|
||||
Configuration values
|
||||
====================
|
||||
|
||||
.. confval:: stream/enabled
|
||||
|
||||
If the stream extension should be enabled or not.
|
||||
|
||||
.. confval:: stream/protocols
|
||||
|
||||
Whitelist of URI schemas to allow streaming from.
|
||||
|
||||
|
||||
Default configuration
|
||||
=====================
|
||||
|
||||
.. literalinclude:: ../../mopidy/backends/stream/ext.conf
|
||||
:language: ini
|
||||
@ -4,10 +4,10 @@ Mopidy
|
||||
|
||||
Mopidy is a music server which can play music both from multiple sources, like
|
||||
your :ref:`local hard drive <local-backend>`, :ref:`radio streams
|
||||
<stream-backend>`, and from :ref:`Spotify <ext-spotify>` and SoundCloud.
|
||||
Searches combines results from all music sources, and you can mix tracks from
|
||||
all sources in your play queue. Your playlists from Spotify or SoundCloud are
|
||||
also available for use.
|
||||
<ext-stream>`, and from :ref:`Spotify <ext-spotify>` and SoundCloud. Searches
|
||||
combines results from all music sources, and you can mix tracks from all
|
||||
sources in your play queue. Your playlists from Spotify or SoundCloud are also
|
||||
available for use.
|
||||
|
||||
To control your Mopidy music server, you can use one of Mopidy's :ref:`web
|
||||
clients <http-clients>`, the :ref:`Ubuntu Sound Menu <ubuntu-sound-menu>`, any
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
.. _stream-backend:
|
||||
|
||||
***********************************************
|
||||
:mod:`mopidy.backends.stream` -- Stream backend
|
||||
***********************************************
|
||||
|
||||
.. automodule:: mopidy.backends.stream
|
||||
:synopsis: Backend for playing audio streams
|
||||
:members:
|
||||
@ -1,53 +1,10 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
import mopidy
|
||||
from mopidy import ext
|
||||
from mopidy.utils import config, formatting
|
||||
|
||||
|
||||
default_config = """
|
||||
[stream]
|
||||
enabled = true
|
||||
protocols =
|
||||
http
|
||||
https
|
||||
mms
|
||||
rtmp
|
||||
rtmps
|
||||
rtsp
|
||||
"""
|
||||
|
||||
__doc__ = """
|
||||
A backend for playing music for streaming music.
|
||||
|
||||
This backend will handle streaming of URIs matching the
|
||||
:confval:`stream/protocols` config value, assuming the needed GStreamer plugins
|
||||
are installed.
|
||||
|
||||
**Issues**
|
||||
|
||||
https://github.com/mopidy/mopidy/issues?labels=Stream+backend
|
||||
|
||||
**Dependencies**
|
||||
|
||||
None
|
||||
|
||||
**Configuration**
|
||||
|
||||
.. confval:: stream/enabled
|
||||
|
||||
If the stream extension should be enabled or not.
|
||||
|
||||
.. confval:: stream/protocols
|
||||
|
||||
Whitelist of URI schemas to allow streaming from.
|
||||
|
||||
**Default config**
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
%(config)s
|
||||
""" % {'config': formatting.indent(default_config)}
|
||||
from mopidy.utils import config
|
||||
|
||||
|
||||
class Extension(ext.Extension):
|
||||
@ -57,7 +14,8 @@ class Extension(ext.Extension):
|
||||
version = mopidy.__version__
|
||||
|
||||
def get_default_config(self):
|
||||
return default_config
|
||||
conf_file = os.path.join(os.path.dirname(__file__), 'ext.conf')
|
||||
return open(conf_file).read()
|
||||
|
||||
def get_config_schema(self):
|
||||
schema = config.ExtensionConfigSchema()
|
||||
|
||||
9
mopidy/backends/stream/ext.conf
Normal file
9
mopidy/backends/stream/ext.conf
Normal file
@ -0,0 +1,9 @@
|
||||
[stream]
|
||||
enabled = true
|
||||
protocols =
|
||||
http
|
||||
https
|
||||
mms
|
||||
rtmp
|
||||
rtmps
|
||||
rtsp
|
||||
Loading…
Reference in New Issue
Block a user