docs: Document settings
This commit is contained in:
parent
9a88cd0dfa
commit
b45fe37a0f
@ -8,6 +8,7 @@ Contents
|
||||
|
||||
changes
|
||||
installation
|
||||
settings
|
||||
development
|
||||
|
||||
Indices and tables
|
||||
|
||||
@ -143,8 +143,8 @@ Test your libspotify setup::
|
||||
words before starting Mopidy).
|
||||
|
||||
|
||||
Settings
|
||||
========
|
||||
Spotify settings
|
||||
================
|
||||
|
||||
Create a file name ``local_settings.py`` in the same directory as
|
||||
``settings.py``. Enter your Spotify Premium account's username and password
|
||||
@ -160,6 +160,9 @@ libspotify backend, copy the Spotify application key to
|
||||
|
||||
BACKEND = u'mopidy.backends.libspotify.LibspotifyBackend'
|
||||
|
||||
For a full list of available settings, see :mod:`mopidy.settings`.
|
||||
|
||||
|
||||
Running Mopidy
|
||||
==============
|
||||
|
||||
|
||||
8
docs/settings.rst
Normal file
8
docs/settings.rst
Normal file
@ -0,0 +1,8 @@
|
||||
********
|
||||
Settings
|
||||
********
|
||||
|
||||
.. automodule:: mopidy.settings
|
||||
:synopsis: Available settings and their default values.
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -14,7 +14,7 @@ logger = logging.getLogger('mopidy')
|
||||
|
||||
def main():
|
||||
_setup_logging(2)
|
||||
backend = _get_backend(config.BACKEND)
|
||||
backend = _get_backend(config.BACKENDS[0])
|
||||
MpdServer(backend=backend)
|
||||
asyncore.loop()
|
||||
|
||||
|
||||
@ -1,17 +1,60 @@
|
||||
"""
|
||||
Available settings and their default values.
|
||||
|
||||
.. warning:: To users
|
||||
|
||||
Do *not* change settings here. Instead, add a file called
|
||||
``mopidy/local_settings.py`` and redefine settings there.
|
||||
|
||||
.. note:: To developers
|
||||
|
||||
When you need to read a setting, import :mod:`mopidy.config` instead of
|
||||
:mod:`mopidy.settings`. This way basic error handling is done for you, and
|
||||
a :exc:`mopidy.exceptions.ConfigError` exception is raised if a setting is
|
||||
not set or is empty when used.
|
||||
"""
|
||||
|
||||
#: List of playback backends to use. Default::
|
||||
#:
|
||||
#: BACKENDS = (u'mopidy.backends.despotify.DespotifyBackend',)
|
||||
#:
|
||||
#: .. note::
|
||||
#: Currently only the first backend in the list is used.
|
||||
#:
|
||||
BACKENDS = (
|
||||
u'mopidy.backends.despotify.DespotifyBackend',
|
||||
#u'mopidy.backends.libspotify.LibspotifyBackend',
|
||||
)
|
||||
|
||||
#: The log format used on the console. See
|
||||
#: http://docs.python.org/library/logging.html#formatter-objects for details on
|
||||
#: the format.
|
||||
CONSOLE_LOG_FORMAT = u'%(levelname)-8s %(asctime)s [%(threadName)s] %(name)s\n %(message)s'
|
||||
|
||||
#: Encoding used in MPD protocol. *Default:* ``utf-8``
|
||||
MPD_LINE_ENCODING = u'utf-8'
|
||||
|
||||
#: Line terminator character used in MPD protocol. *Default:* ``\n``
|
||||
MPD_LINE_TERMINATOR = u'\n'
|
||||
|
||||
#: Which address Mopidy should bind to. Examples:
|
||||
#:
|
||||
#: ``localhost``
|
||||
#: Listens only on the loopback interface. *Default.*
|
||||
#: ``0.0.0.0``
|
||||
#: listens on all interfaces.
|
||||
MPD_SERVER_HOSTNAME = u'localhost'
|
||||
|
||||
#: Which TCP port Mopidy should listen to. *Default: 6600*
|
||||
MPD_SERVER_PORT = 6600
|
||||
|
||||
BACKEND=u'mopidy.backends.despotify.DespotifyBackend'
|
||||
#BACKEND=u'mopidy.backends.libspotify.LibspotifyBackend'
|
||||
|
||||
#: Your Spotify Premium username. Used by all Spotify backends.
|
||||
SPOTIFY_USERNAME = u''
|
||||
|
||||
#: Your Spotify Premium password. Used by all Spotify backends.
|
||||
SPOTIFY_PASSWORD = u''
|
||||
|
||||
try:
|
||||
from mopidy.local_settings import *
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user