docs: Move local to ext registry
This commit is contained in:
parent
8bcf1de21c
commit
ae7543a985
@ -60,7 +60,7 @@ Music from local storage
|
||||
|
||||
If you want use Mopidy to play music you have locally at your machine instead
|
||||
of or in addition to using Spotify, you need to review and maybe change some of
|
||||
the local backend config values. See :ref:`local-backend`, for a complete list.
|
||||
the local backend config values. See :ref:`ext-local`, for a complete list.
|
||||
Then you need to generate a tag cache for your local music...
|
||||
|
||||
|
||||
|
||||
49
docs/ext/local.rst
Normal file
49
docs/ext/local.rst
Normal file
@ -0,0 +1,49 @@
|
||||
.. _ext-local:
|
||||
|
||||
************
|
||||
Mopidy-Local
|
||||
************
|
||||
|
||||
Extension for playing music from a local music archive.
|
||||
|
||||
This backend handles URIs starting with ``file:``. See
|
||||
:ref:`music-from-local-storage` for further instructions on using this backend.
|
||||
|
||||
|
||||
Known issues
|
||||
============
|
||||
|
||||
https://github.com/mopidy/mopidy/issues?labels=Local+backend
|
||||
|
||||
|
||||
Dependencies
|
||||
============
|
||||
|
||||
None. The extension just needs Mopidy.
|
||||
|
||||
|
||||
Configuration values
|
||||
====================
|
||||
|
||||
.. confval:: local/enabled
|
||||
|
||||
If the local extension should be enabled or not.
|
||||
|
||||
.. confval:: local/media_dir
|
||||
|
||||
Path to directory with local media files.
|
||||
|
||||
.. confval:: local/playlists_dir
|
||||
|
||||
Path to playlists directory with m3u files for local media.
|
||||
|
||||
.. confval:: local/tag_cache_file
|
||||
|
||||
Path to tag cache for local media.
|
||||
|
||||
|
||||
Default configuration
|
||||
=====================
|
||||
|
||||
.. literalinclude:: ../../mopidy/backends/local/ext.conf
|
||||
:language: ini
|
||||
@ -3,11 +3,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
|
||||
<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.
|
||||
your :ref:`local hard drive <ext-local>`, :ref:`radio streams <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,8 +0,0 @@
|
||||
.. _local-backend:
|
||||
|
||||
*********************************************
|
||||
:mod:`mopidy.backends.local` -- Local backend
|
||||
*********************************************
|
||||
|
||||
.. automodule:: mopidy.backends.local
|
||||
:synopsis: Backend for playing music files on local storage
|
||||
@ -1,57 +1,10 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
import mopidy
|
||||
from mopidy import ext
|
||||
from mopidy.utils import config, formatting
|
||||
|
||||
|
||||
default_config = """
|
||||
[local]
|
||||
enabled = true
|
||||
media_dir = $XDG_MUSIC_DIR
|
||||
playlists_dir = $XDG_DATA_DIR/mopidy/local/playlists
|
||||
tag_cache_file = $XDG_DATA_DIR/mopidy/local/tag_cache
|
||||
"""
|
||||
|
||||
__doc__ = """A backend for playing music from a local music archive.
|
||||
|
||||
This backend handles URIs starting with ``file:``.
|
||||
|
||||
See :ref:`music-from-local-storage` for further instructions on using this
|
||||
backend.
|
||||
|
||||
**Issues**
|
||||
|
||||
https://github.com/mopidy/mopidy/issues?labels=Local+backend
|
||||
|
||||
**Dependencies**
|
||||
|
||||
None
|
||||
|
||||
**Configuration**
|
||||
|
||||
.. confval:: local/enabled
|
||||
|
||||
If the local extension should be enabled or not.
|
||||
|
||||
.. confval:: local/media_dir
|
||||
|
||||
Path to directory with local media files.
|
||||
|
||||
.. confval:: local/playlists_dir
|
||||
|
||||
Path to playlists directory with m3u files for local media.
|
||||
|
||||
.. confval:: local/tag_cache_file
|
||||
|
||||
Path to tag cache for local media.
|
||||
|
||||
**Default config**
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
%(config)s
|
||||
""" % {'config': formatting.indent(default_config)}
|
||||
from mopidy.utils import config
|
||||
|
||||
|
||||
class Extension(ext.Extension):
|
||||
@ -61,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()
|
||||
|
||||
5
mopidy/backends/local/ext.conf
Normal file
5
mopidy/backends/local/ext.conf
Normal file
@ -0,0 +1,5 @@
|
||||
[local]
|
||||
enabled = true
|
||||
media_dir = $XDG_MUSIC_DIR
|
||||
playlists_dir = $XDG_DATA_DIR/mopidy/local/playlists
|
||||
tag_cache_file = $XDG_DATA_DIR/mopidy/local/tag_cache
|
||||
Loading…
Reference in New Issue
Block a user