docs: Move scrobbler docs to new ext registry

This commit is contained in:
Stein Magnus Jodal 2013-04-11 23:01:56 +02:00
parent 5fb16eb1ea
commit 6072bbe0b8
5 changed files with 56 additions and 53 deletions

View File

@ -15,6 +15,7 @@ These extensions are created and maintained by Mopidy's core developers. They
are installed together with Mopidy and are enabled by default.
.. toctree::
:maxdepth: 2
:glob:
**

46
docs/ext/scrobbler.rst Normal file
View File

@ -0,0 +1,46 @@
****************
Mopidy-Scrobbler
****************
This extension scrobbles the music you play to your `Last.fm
<http://www.last.fm>`_ profile.
.. note::
This extension requires a free user account at Last.fm.
Dependencies
============
.. literalinclude:: ../../requirements/scrobbler.txt
Configuration values
====================
.. confval:: scrobbler/enabled
If the scrobbler extension should be enabled or not.
.. confval:: scrobbler/username
Your Last.fm username.
.. confval:: scrobbler/password
Your Last.fm password.
Default configuration
=====================
.. literalinclude:: ../../mopidy/frontends/scrobbler/ext.conf
:language: ini
Usage
=====
The extension is enabled by default if all dependencies are available. You just
need to add your Last.fm username and password to the config file.

View File

@ -1,6 +0,0 @@
***********************************************
:mod:`mopidy.frontends.scrobbler` -- Scrobbler
***********************************************
.. automodule:: mopidy.frontends.scrobbler
:synopsis: Music scrobbler frontend

View File

@ -1,53 +1,10 @@
from __future__ import unicode_literals
import os
import mopidy
from mopidy import exceptions, ext
from mopidy.utils import config, formatting
default_config = """
[scrobbler]
enabled = true
username =
password =
"""
__doc__ = """
Frontend which scrobbles the music you play to your
`Last.fm <http://www.last.fm>`_ profile.
.. note::
This frontend requires a free user account at Last.fm.
**Dependencies**
.. literalinclude:: ../../../requirements/scrobbler.txt
**Configuration**
.. confval:: scrobbler/enabled
If the scrobbler extension should be enabled or not.
.. confval:: scrobbler/username
Your Last.fm username.
.. confval:: scrobbler/password
Your Last.fm password.
**Default config**
.. code-block:: ini
%(config)s
**Usage**
The frontend is enabled by default if all dependencies are available.
""" % {'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()

View File

@ -0,0 +1,4 @@
[scrobbler]
enabled = true
username =
password =