diff --git a/docs/api/audio.rst b/docs/api/audio.rst
index e00772fd..2b9f6cc5 100644
--- a/docs/api/audio.rst
+++ b/docs/api/audio.rst
@@ -4,6 +4,10 @@
Audio API
*********
+.. module:: mopidy.audio
+ :synopsis: Thin wrapper around the parts of GStreamer we use
+
+
The audio API is the interface we have built around GStreamer to support our
specific use cases. Most backends should be able to get by with simply setting
the URI of the resource they want to play, for these cases the default playback
diff --git a/docs/api/backends.rst b/docs/api/backends.rst
index a1aa48a0..c296fb78 100644
--- a/docs/api/backends.rst
+++ b/docs/api/backends.rst
@@ -4,6 +4,9 @@
Backend API
***********
+.. module:: mopidy.backends.base
+ :synopsis: The API implemented by backends
+
The backend API is the interface that must be implemented when you create a
backend. If you are working on a frontend and need to access the backend, see
the :ref:`core-api`.
diff --git a/docs/api/core.rst b/docs/api/core.rst
index 1563b61b..eb1b9683 100644
--- a/docs/api/core.rst
+++ b/docs/api/core.rst
@@ -4,6 +4,9 @@
Core API
********
+.. module:: mopidy.core
+ :synopsis: Core API for use by frontends
+
The core API is the interface that is used by frontends like
:mod:`mopidy.frontends.mpd`. The core layer is inbetween the frontends and the
diff --git a/docs/modules/audio/mixers/auto.rst b/docs/modules/audio/mixers/auto.rst
new file mode 100644
index 00000000..caf6e3ab
--- /dev/null
+++ b/docs/modules/audio/mixers/auto.rst
@@ -0,0 +1,6 @@
+*********************************************
+:mod:`mopidy.audio.mixers.auto` -- Auto mixer
+*********************************************
+
+.. automodule:: mopidy.audio.mixers.auto
+ :synopsis: Mixer element which automatically selects the real mixer to use
diff --git a/docs/modules/audio/mixers/fake.rst b/docs/modules/audio/mixers/fake.rst
new file mode 100644
index 00000000..dcab7767
--- /dev/null
+++ b/docs/modules/audio/mixers/fake.rst
@@ -0,0 +1,6 @@
+*********************************************
+:mod:`mopidy.audio.mixers.fake` -- Fake mixer
+*********************************************
+
+.. automodule:: mopidy.audio.mixers.fake
+ :synopsis: Fake mixer for use in tests
diff --git a/docs/modules/audio/mixers/nad.rst b/docs/modules/audio/mixers/nad.rst
new file mode 100644
index 00000000..661dc723
--- /dev/null
+++ b/docs/modules/audio/mixers/nad.rst
@@ -0,0 +1,6 @@
+*********************************************
+:mod:`mopidy.audio.mixers.nad` -- NAD mixer
+*********************************************
+
+.. automodule:: mopidy.audio.mixers.nad
+ :synopsis: Mixer element for controlling volume on NAD amplifiers
diff --git a/docs/modules/backends/local.rst b/docs/modules/backends/local.rst
index 892f5a87..b4ab7d49 100644
--- a/docs/modules/backends/local.rst
+++ b/docs/modules/backends/local.rst
@@ -4,4 +4,3 @@
.. automodule:: mopidy.backends.local
:synopsis: Backend for playing music files on local storage
- :members:
diff --git a/docs/modules/backends/spotify.rst b/docs/modules/backends/spotify.rst
index 938d6337..e724da27 100644
--- a/docs/modules/backends/spotify.rst
+++ b/docs/modules/backends/spotify.rst
@@ -4,4 +4,3 @@
.. automodule:: mopidy.backends.spotify
:synopsis: Backend for the Spotify music streaming service
- :members:
diff --git a/docs/modules/frontends/lastfm.rst b/docs/modules/frontends/lastfm.rst
index a726f4a2..0dba922f 100644
--- a/docs/modules/frontends/lastfm.rst
+++ b/docs/modules/frontends/lastfm.rst
@@ -4,4 +4,3 @@
.. automodule:: mopidy.frontends.lastfm
:synopsis: Last.fm scrobbler frontend
- :members:
diff --git a/docs/modules/frontends/mpd.rst b/docs/modules/frontends/mpd.rst
index 0ce138a2..090ca5cd 100644
--- a/docs/modules/frontends/mpd.rst
+++ b/docs/modules/frontends/mpd.rst
@@ -4,7 +4,6 @@
.. automodule:: mopidy.frontends.mpd
:synopsis: MPD server frontend
- :members:
MPD dispatcher
@@ -27,6 +26,7 @@ Audio output
------------
.. automodule:: mopidy.frontends.mpd.protocol.audio_output
+ :synopsis: MPD protocol: audio output
:members:
@@ -34,6 +34,7 @@ Command list
------------
.. automodule:: mopidy.frontends.mpd.protocol.command_list
+ :synopsis: MPD protocol: command list
:members:
@@ -41,6 +42,7 @@ Connection
----------
.. automodule:: mopidy.frontends.mpd.protocol.connection
+ :synopsis: MPD protocol: connection
:members:
@@ -48,12 +50,15 @@ Current playlist
----------------
.. automodule:: mopidy.frontends.mpd.protocol.current_playlist
+ :synopsis: MPD protocol: current playlist
:members:
+
Music database
--------------
.. automodule:: mopidy.frontends.mpd.protocol.music_db
+ :synopsis: MPD protocol: music database
:members:
@@ -61,6 +66,7 @@ Playback
--------
.. automodule:: mopidy.frontends.mpd.protocol.playback
+ :synopsis: MPD protocol: playback
:members:
@@ -68,6 +74,7 @@ Reflection
----------
.. automodule:: mopidy.frontends.mpd.protocol.reflection
+ :synopsis: MPD protocol: reflection
:members:
@@ -75,6 +82,7 @@ Status
------
.. automodule:: mopidy.frontends.mpd.protocol.status
+ :synopsis: MPD protocol: status
:members:
@@ -82,6 +90,7 @@ Stickers
--------
.. automodule:: mopidy.frontends.mpd.protocol.stickers
+ :synopsis: MPD protocol: stickers
:members:
@@ -89,4 +98,5 @@ Stored playlists
----------------
.. automodule:: mopidy.frontends.mpd.protocol.stored_playlists
+ :synopsis: MPD protocol: stored playlists
:members:
diff --git a/docs/modules/frontends/mpris.rst b/docs/modules/frontends/mpris.rst
index 05a6e287..2984e4c1 100644
--- a/docs/modules/frontends/mpris.rst
+++ b/docs/modules/frontends/mpris.rst
@@ -4,4 +4,3 @@
.. automodule:: mopidy.frontends.mpris
:synopsis: MPRIS frontend
- :members:
diff --git a/docs/settings.rst b/docs/settings.rst
index a79dfd78..b71b18ef 100644
--- a/docs/settings.rst
+++ b/docs/settings.rst
@@ -29,6 +29,8 @@ A complete ``~/.config/mopidy/settings.py`` may look as simple as this::
SPOTIFY_PASSWORD = u'mysecret'
+.. _music-from-spotify:
+
Music from Spotify
==================
@@ -39,6 +41,8 @@ Premium account's username and password into the file, like this::
SPOTIFY_PASSWORD = u'mysecret'
+.. _music-from-local-storage:
+
Music from local storage
========================
diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py
index 95d6683c..852d5d57 100644
--- a/mopidy/audio/actor.py
+++ b/mopidy/audio/actor.py
@@ -231,7 +231,7 @@ class Audio(pykka.ThreadingActor):
Set position in milliseconds.
:param position: the position in milliseconds
- :type volume: int
+ :type position: int
:rtype: :class:`True` if successful, else :class:`False`
"""
self._playbin.get_state() # block until state changes are done
diff --git a/mopidy/audio/mixers/auto.py b/mopidy/audio/mixers/auto.py
index f3806eef..05294801 100644
--- a/mopidy/audio/mixers/auto.py
+++ b/mopidy/audio/mixers/auto.py
@@ -1,3 +1,17 @@
+"""Mixer element that automatically selects the real mixer to use.
+
+This is Mopidy's default mixer.
+
+**Dependencies:**
+
+- None
+
+**Settings:**
+
+- If this wasn't the default, you would set :attr:`mopidy.settings.MIXER`
+ to ``autoaudiomixer`` to use this mixer.
+"""
+
import pygst
pygst.require('0.10')
import gst
diff --git a/mopidy/audio/mixers/fake.py b/mopidy/audio/mixers/fake.py
index b22e731e..10710466 100644
--- a/mopidy/audio/mixers/fake.py
+++ b/mopidy/audio/mixers/fake.py
@@ -1,3 +1,14 @@
+"""Fake mixer for use in tests.
+
+**Dependencies:**
+
+- None
+
+**Settings:**
+
+- Set :attr:`mopidy.settings.MIXER` to ``fakemixer`` to use this mixer.
+"""
+
import pygst
pygst.require('0.10')
import gobject
diff --git a/mopidy/audio/mixers/nad.py b/mopidy/audio/mixers/nad.py
index 1d65ead9..cb1266a1 100644
--- a/mopidy/audio/mixers/nad.py
+++ b/mopidy/audio/mixers/nad.py
@@ -1,3 +1,50 @@
+"""Mixer that controls volume using a NAD amplifier.
+
+**Dependencies:**
+
+- pyserial (python-serial in Debian/Ubuntu)
+
+- The NAD amplifier must be connected to the machine running Mopidy using a
+ serial cable.
+
+**Settings:**
+
+- Set :attr:`mopidy.settings.MIXER` to ``nadmixer`` to use it. You probably
+ also needs to add some properties to the ``MIXER`` setting.
+
+Supported properties includes:
+
+``port``:
+ The serial device to use, defaults to ``/dev/ttyUSB0``. This must be
+ set correctly for the mixer to work.
+
+``source``:
+ The source that should be selected on the amplifier, like ``aux``,
+ ``disc``, ``tape``, ``tuner``, etc. Leave unset if you don't want the
+ mixer to change it for you.
+
+``speakers-a``:
+ Set to ``on`` or ``off`` if you want the mixer to make sure that
+ speaker set A is turned on or off. Leave unset if you don't want the
+ mixer to change it for you.
+
+``speakers-b``:
+ See ``speakers-a``.
+
+Configuration examples::
+
+ # Minimum configuration, if the amplifier is available at /dev/ttyUSB0
+ MIXER = u'nadmixer'
+
+ # Minimum configuration, if the amplifier is available elsewhere
+ MIXER = u'nadmixer port=/dev/ttyUSB3'
+
+ # Full configuration
+ MIXER = (
+ u'nadmixer port=/dev/ttyUSB0 '
+ u'source=aux speakers-a=on speakers-b=off')
+"""
+
import logging
import pygst
@@ -76,7 +123,7 @@ class NadMixer(gst.Element, gst.ImplementsInterface, gst.interfaces.Mixer):
class NadTalker(pykka.ThreadingActor):
"""
- Independent thread which does the communication with the NAD amplifier
+ Independent thread which does the communication with the NAD amplifier.
Since the communication is done in an independent thread, Mopidy won't
block other requests while doing rather time consuming work like
diff --git a/mopidy/backends/dummy.py b/mopidy/backends/dummy.py
index 94bb9b1d..51129200 100644
--- a/mopidy/backends/dummy.py
+++ b/mopidy/backends/dummy.py
@@ -1,3 +1,19 @@
+"""A dummy backend for use in tests.
+
+This backend implements the backend API in the simplest way possible. It is
+used in tests of the frontends.
+
+The backend handles URIs starting with ``dummy:``.
+
+**Dependencies:**
+
+- None
+
+**Settings:**
+
+- None
+"""
+
import pykka
from mopidy.backends import base
@@ -5,13 +21,6 @@ from mopidy.models import Playlist
class DummyBackend(pykka.ThreadingActor, base.Backend):
- """
- A backend which implements the backend API in the simplest way possible.
- Used in tests of the frontends.
-
- Handles URIs starting with ``dummy:``.
- """
-
def __init__(self, audio):
super(DummyBackend, self).__init__()
diff --git a/mopidy/backends/local/__init__.py b/mopidy/backends/local/__init__.py
index 6f0f3770..6f049474 100644
--- a/mopidy/backends/local/__init__.py
+++ b/mopidy/backends/local/__init__.py
@@ -1,2 +1,24 @@
+"""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
+
+**Settings:**
+
+- :attr:`mopidy.settings.LOCAL_MUSIC_PATH`
+- :attr:`mopidy.settings.LOCAL_PLAYLIST_PATH`
+- :attr:`mopidy.settings.LOCAL_TAG_CACHE_FILE`
+"""
+
# flake8: noqa
from .actor import LocalBackend
diff --git a/mopidy/backends/local/actor.py b/mopidy/backends/local/actor.py
index 10802722..70351ed1 100644
--- a/mopidy/backends/local/actor.py
+++ b/mopidy/backends/local/actor.py
@@ -11,20 +11,6 @@ logger = logging.getLogger(u'mopidy.backends.local')
class LocalBackend(pykka.ThreadingActor, base.Backend):
- """
- A backend for playing music from a local music archive.
-
- **Dependencies:**
-
- - None
-
- **Settings:**
-
- - :attr:`mopidy.settings.LOCAL_MUSIC_PATH`
- - :attr:`mopidy.settings.LOCAL_PLAYLIST_PATH`
- - :attr:`mopidy.settings.LOCAL_TAG_CACHE_FILE`
- """
-
def __init__(self, audio):
super(LocalBackend, self).__init__()
diff --git a/mopidy/backends/spotify/__init__.py b/mopidy/backends/spotify/__init__.py
index 87d76c46..bb0c805b 100644
--- a/mopidy/backends/spotify/__init__.py
+++ b/mopidy/backends/spotify/__init__.py
@@ -1,2 +1,34 @@
+"""A backend for playing music from Spotify
+
+`Spotify `_ is a music streaming service. The backend
+uses the official `libspotify
+`_ library and the
+`pyspotify `_ Python bindings for
+libspotify. This backend handles URIs starting with ``spotify:``.
+
+See :ref:`music-from-spotify` for further instructions on using this backend.
+
+.. note::
+
+ This product uses SPOTIFY(R) CORE but is not endorsed, certified or
+ otherwise approved in any way by Spotify. Spotify is the registered
+ trade mark of the Spotify Group.
+
+**Issues:**
+
+https://github.com/mopidy/mopidy/issues?labels=Spotify+backend
+
+**Dependencies:**
+
+- libspotify >= 11, < 12 (libspotify11 package from apt.mopidy.com)
+- pyspotify >= 1.7, < 1.8 (python-spotify package from apt.mopidy.com)
+
+**Settings:**
+
+- :attr:`mopidy.settings.SPOTIFY_CACHE_PATH`
+- :attr:`mopidy.settings.SPOTIFY_USERNAME`
+- :attr:`mopidy.settings.SPOTIFY_PASSWORD`
+"""
+
# flake8: noqa
from .actor import SpotifyBackend
diff --git a/mopidy/backends/spotify/actor.py b/mopidy/backends/spotify/actor.py
index 948636a2..943600fc 100644
--- a/mopidy/backends/spotify/actor.py
+++ b/mopidy/backends/spotify/actor.py
@@ -9,34 +9,6 @@ logger = logging.getLogger('mopidy.backends.spotify')
class SpotifyBackend(pykka.ThreadingActor, base.Backend):
- """
- A backend for playing music from the `Spotify `_
- music streaming service. The backend uses the official `libspotify
- `_ library and the
- `pyspotify `_ Python bindings for
- libspotify.
-
- .. note::
-
- This product uses SPOTIFY(R) CORE but is not endorsed, certified or
- otherwise approved in any way by Spotify. Spotify is the registered
- trade mark of the Spotify Group.
-
- **Issues:**
- https://github.com/mopidy/mopidy/issues?labels=backend-spotify
-
- **Dependencies:**
-
- - libspotify >= 10, < 11 (libspotify10 package from apt.mopidy.com)
- - pyspotify >= 1.5 (python-spotify package from apt.mopidy.com)
-
- **Settings:**
-
- - :attr:`mopidy.settings.SPOTIFY_CACHE_PATH`
- - :attr:`mopidy.settings.SPOTIFY_USERNAME`
- - :attr:`mopidy.settings.SPOTIFY_PASSWORD`
- """
-
# Imports inside methods are to prevent loading of __init__.py to fail on
# missing spotify dependencies.
diff --git a/mopidy/frontends/lastfm.py b/mopidy/frontends/lastfm.py
index e7c2afdb..aaf55ec1 100644
--- a/mopidy/frontends/lastfm.py
+++ b/mopidy/frontends/lastfm.py
@@ -1,3 +1,27 @@
+"""
+Frontend which scrobbles the music you play to your `Last.fm
+`_ profile.
+
+.. note::
+
+ This frontend requires a free user account at Last.fm.
+
+**Dependencies:**
+
+- `pylast `_ >= 0.5.7
+
+**Settings:**
+
+- :attr:`mopidy.settings.LASTFM_USERNAME`
+- :attr:`mopidy.settings.LASTFM_PASSWORD`
+
+**Usage:**
+
+Make sure :attr:`mopidy.settings.FRONTENDS` includes
+``mopidy.frontends.lastfm.LastfmFrontend``. By default, the setting includes
+the Last.fm frontend.
+"""
+
import logging
import time
@@ -18,24 +42,6 @@ API_SECRET = '94d9a09c0cd5be955c4afaeaffcaefcd'
class LastfmFrontend(pykka.ThreadingActor, CoreListener):
- """
- Frontend which scrobbles the music you play to your `Last.fm
- `_ profile.
-
- .. note::
-
- This frontend requires a free user account at Last.fm.
-
- **Dependencies:**
-
- - `pylast `_ >= 0.5.7
-
- **Settings:**
-
- - :attr:`mopidy.settings.LASTFM_USERNAME`
- - :attr:`mopidy.settings.LASTFM_PASSWORD`
- """
-
def __init__(self, core):
super(LastfmFrontend, self).__init__()
self.lastfm = None
diff --git a/mopidy/frontends/mpd/__init__.py b/mopidy/frontends/mpd/__init__.py
index e2d2b9c7..a6cfd386 100644
--- a/mopidy/frontends/mpd/__init__.py
+++ b/mopidy/frontends/mpd/__init__.py
@@ -1,2 +1,25 @@
+"""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
+original MPD server.
+
+**Dependencies:**
+
+- None
+
+**Settings:**
+
+- :attr:`mopidy.settings.MPD_SERVER_HOSTNAME`
+- :attr:`mopidy.settings.MPD_SERVER_PORT`
+- :attr:`mopidy.settings.MPD_SERVER_PASSWORD`
+
+**Usage:**
+
+Make sure :attr:`mopidy.settings.FRONTENDS` includes
+``mopidy.frontends.mpd.MpdFrontend``. By default, the setting includes the MPD
+frontend.
+"""
+
# flake8: noqa
from .actor import MpdFrontend
diff --git a/mopidy/frontends/mpd/actor.py b/mopidy/frontends/mpd/actor.py
index f69334b5..e136ddee 100644
--- a/mopidy/frontends/mpd/actor.py
+++ b/mopidy/frontends/mpd/actor.py
@@ -12,20 +12,6 @@ logger = logging.getLogger('mopidy.frontends.mpd')
class MpdFrontend(pykka.ThreadingActor, CoreListener):
- """
- The MPD frontend.
-
- **Dependencies:**
-
- - None
-
- **Settings:**
-
- - :attr:`mopidy.settings.MPD_SERVER_HOSTNAME`
- - :attr:`mopidy.settings.MPD_SERVER_PORT`
- - :attr:`mopidy.settings.MPD_SERVER_PASSWORD`
- """
-
def __init__(self, core):
super(MpdFrontend, self).__init__()
hostname = network.format_hostname(settings.MPD_SERVER_HOSTNAME)
diff --git a/mopidy/frontends/mpris/__init__.py b/mopidy/frontends/mpris/__init__.py
index 93ad0795..4245f844 100644
--- a/mopidy/frontends/mpris/__init__.py
+++ b/mopidy/frontends/mpris/__init__.py
@@ -1,2 +1,54 @@
+"""
+Frontend which lets you control Mopidy through the Media Player Remote
+Interfacing Specification (`MPRIS `_) D-Bus
+interface.
+
+An example of an MPRIS client is the `Ubuntu Sound Menu
+`_.
+
+**Dependencies:**
+
+- D-Bus Python bindings. The package is named ``python-dbus`` in
+ Ubuntu/Debian.
+
+- ``libindicate`` Python bindings is needed to expose Mopidy in e.g. the
+ Ubuntu Sound Menu. The package is named ``python-indicate`` in
+ Ubuntu/Debian.
+
+- An ``.desktop`` file for Mopidy installed at the path set in
+ :attr:`mopidy.settings.DESKTOP_FILE`. See :ref:`install_desktop_file` for
+ details.
+
+**Settings:**
+
+- :attr:`mopidy.settings.DESKTOP_FILE`
+
+**Usage:**
+
+Make sure :attr:`mopidy.settings.FRONTENDS` includes
+``mopidy.frontends.mpris.MprisFrontend``. By default, the setting includes the
+MPRIS frontend.
+
+**Testing the frontend**
+
+To test, start Mopidy, and then run the following in a Python shell::
+
+ import dbus
+ bus = dbus.SessionBus()
+ player = bus.get_object('org.mpris.MediaPlayer2.mopidy',
+ '/org/mpris/MediaPlayer2')
+
+Now you can control Mopidy through the player object. Examples:
+
+- To get some properties from Mopidy, run::
+
+ props = player.GetAll('org.mpris.MediaPlayer2',
+ dbus_interface='org.freedesktop.DBus.Properties')
+
+- To quit Mopidy through D-Bus, run::
+
+ player.Quit(dbus_interface='org.mpris.MediaPlayer2')
+"""
+
# flake8: noqa
from .actor import MprisFrontend
diff --git a/mopidy/frontends/mpris/actor.py b/mopidy/frontends/mpris/actor.py
index acca3ab7..5d8d5492 100644
--- a/mopidy/frontends/mpris/actor.py
+++ b/mopidy/frontends/mpris/actor.py
@@ -16,46 +16,6 @@ except ImportError as import_error:
class MprisFrontend(pykka.ThreadingActor, CoreListener):
- """
- Frontend which lets you control Mopidy through the Media Player Remote
- Interfacing Specification (`MPRIS `_) D-Bus
- interface.
-
- An example of an MPRIS client is the `Ubuntu Sound Menu
- `_.
-
- **Dependencies:**
-
- - D-Bus Python bindings. The package is named ``python-dbus`` in
- Ubuntu/Debian.
- - ``libindicate`` Python bindings is needed to expose Mopidy in e.g. the
- Ubuntu Sound Menu. The package is named ``python-indicate`` in
- Ubuntu/Debian.
- - An ``.desktop`` file for Mopidy installed at the path set in
- :attr:`mopidy.settings.DESKTOP_FILE`. See :ref:`install_desktop_file` for
- details.
-
- **Testing the frontend**
-
- To test, start Mopidy, and then run the following in a Python shell::
-
- import dbus
- bus = dbus.SessionBus()
- player = bus.get_object('org.mpris.MediaPlayer2.mopidy',
- '/org/mpris/MediaPlayer2')
-
- Now you can control Mopidy through the player object. Examples:
-
- - To get some properties from Mopidy, run::
-
- props = player.GetAll('org.mpris.MediaPlayer2',
- dbus_interface='org.freedesktop.DBus.Properties')
-
- - To quit Mopidy through D-Bus, run::
-
- player.Quit(dbus_interface='org.mpris.MediaPlayer2')
- """
-
def __init__(self, core):
super(MprisFrontend, self).__init__()
self.core = core