docs: Move scrobbler docs to new ext registry
This commit is contained in:
parent
5fb16eb1ea
commit
6072bbe0b8
@ -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
46
docs/ext/scrobbler.rst
Normal 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.
|
||||
@ -1,6 +0,0 @@
|
||||
***********************************************
|
||||
:mod:`mopidy.frontends.scrobbler` -- Scrobbler
|
||||
***********************************************
|
||||
|
||||
.. automodule:: mopidy.frontends.scrobbler
|
||||
:synopsis: Music scrobbler frontend
|
||||
@ -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()
|
||||
|
||||
4
mopidy/frontends/scrobbler/ext.conf
Normal file
4
mopidy/frontends/scrobbler/ext.conf
Normal file
@ -0,0 +1,4 @@
|
||||
[scrobbler]
|
||||
enabled = true
|
||||
username =
|
||||
password =
|
||||
Loading…
Reference in New Issue
Block a user