diff --git a/docs/api/frontends.rst b/docs/api/frontends.rst index a6e6f500..ac1f8bd1 100644 --- a/docs/api/frontends.rst +++ b/docs/api/frontends.rst @@ -45,6 +45,6 @@ Frontend implementations ======================== * :mod:`mopidy.frontends.http` -* :mod:`mopidy.frontends.lastfm` +* :mod:`mopidy.frontends.scrobbler` * :mod:`mopidy.frontends.mpd` * :mod:`mopidy.frontends.mpris` diff --git a/docs/modules/frontends/lastfm.rst b/docs/modules/frontends/lastfm.rst deleted file mode 100644 index 0dba922f..00000000 --- a/docs/modules/frontends/lastfm.rst +++ /dev/null @@ -1,6 +0,0 @@ -*************************************************** -:mod:`mopidy.frontends.lastfm` -- Last.fm Scrobbler -*************************************************** - -.. automodule:: mopidy.frontends.lastfm - :synopsis: Last.fm scrobbler frontend diff --git a/docs/modules/frontends/scrobbler.rst b/docs/modules/frontends/scrobbler.rst new file mode 100644 index 00000000..eee65724 --- /dev/null +++ b/docs/modules/frontends/scrobbler.rst @@ -0,0 +1,6 @@ +********************************************** +:mod:`mopidy.frontends.scrobble` -- Scrobbler +********************************************** + +.. automodule:: mopidy.frontends.scrobbler + :synopsis: Music scrobbler frontend diff --git a/docs/settings.rst b/docs/settings.rst index cb47a71f..4c9acd96 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -106,8 +106,8 @@ Scrobbling tracks to Last.fm If you want to submit the tracks you are playing to your `Last.fm `_ profile, make sure you've installed the dependencies -found at :mod:`mopidy.frontends.lastfm` and add the following to your settings -file:: +found at :mod:`mopidy.frontends.scrobbler` and add the following to your +settings file:: LASTFM_USERNAME = u'myusername' LASTFM_PASSWORD = u'mysecret' diff --git a/mopidy/frontends/lastfm/__init__.py b/mopidy/frontends/scrobbler/__init__.py similarity index 85% rename from mopidy/frontends/lastfm/__init__.py rename to mopidy/frontends/scrobbler/__init__.py index f4bff0e5..c33a5fa3 100644 --- a/mopidy/frontends/lastfm/__init__.py +++ b/mopidy/frontends/scrobbler/__init__.py @@ -6,7 +6,7 @@ from mopidy.utils import config, formatting default_config = """ -[lastfm] +[scrobbler] # If the Last.fm extension should be enabled or not enabled = true @@ -28,7 +28,7 @@ Frontend which scrobbles the music you play to your `Last.fm **Dependencies** -.. literalinclude:: ../../../requirements/lastfm.txt +.. literalinclude:: ../../../requirements/scrobbler.txt **Default config** @@ -44,8 +44,8 @@ The frontend is enabled by default if all dependencies are available. class Extension(ext.Extension): - dist_name = 'Mopidy-Lastfm' - ext_name = 'lastfm' + dist_name = 'Mopidy-Scrobbler' + ext_name = 'scrobbler' version = mopidy.__version__ def get_default_config(self): @@ -64,5 +64,5 @@ class Extension(ext.Extension): raise exceptions.ExtensionError('pylast library not found', e) def get_frontend_classes(self): - from .actor import LastfmFrontend - return [LastfmFrontend] + from .actor import ScrobblerFrontend + return [ScrobblerFrontend] diff --git a/mopidy/frontends/lastfm/actor.py b/mopidy/frontends/scrobbler/actor.py similarity index 95% rename from mopidy/frontends/lastfm/actor.py rename to mopidy/frontends/scrobbler/actor.py index 1e157d4f..eea088de 100644 --- a/mopidy/frontends/lastfm/actor.py +++ b/mopidy/frontends/scrobbler/actor.py @@ -13,15 +13,15 @@ try: except ImportError as import_error: raise exceptions.OptionalDependencyError(import_error) -logger = logging.getLogger('mopidy.frontends.lastfm') +logger = logging.getLogger('mopidy.frontends.scrobbler') API_KEY = '2236babefa8ebb3d93ea467560d00d04' API_SECRET = '94d9a09c0cd5be955c4afaeaffcaefcd' -class LastfmFrontend(pykka.ThreadingActor, CoreListener): +class ScrobblerFrontend(pykka.ThreadingActor, CoreListener): def __init__(self, config, core): - super(LastfmFrontend, self).__init__() + super(ScrobblerFrontend, self).__init__() self.lastfm = None self.last_start_time = None diff --git a/requirements/lastfm.txt b/requirements/scrobbler.txt similarity index 100% rename from requirements/lastfm.txt rename to requirements/scrobbler.txt diff --git a/setup.py b/setup.py index 3c0b7c4c..2f4d98d6 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ setup( ], extras_require={ b'spotify': ['pyspotify >= 1.9, < 1.11'], - b'lastfm': ['pylast >= 0.5.7'], + b'scrobbler': ['pylast >= 0.5.7'], b'http': ['cherrypy >= 3.2.2', 'ws4py >= 0.2.3'], b'external_mixers': ['pyserial'], }, @@ -46,7 +46,7 @@ setup( ], b'mopidy.ext': [ 'http = mopidy.frontends.http:Extension [http]', - 'lastfm = mopidy.frontends.lastfm:Extension [lastfm]', + 'scrobbler = mopidy.frontends.scrobbler:Extension [scrobbler]', 'local = mopidy.backends.local:Extension', 'mpd = mopidy.frontends.mpd:Extension', 'mpris = mopidy.frontends.mpris:Extension',