scrobbler: Renamed lastfm to scrobbler (fixes #375)
This commit is contained in:
parent
c9115aa480
commit
7d44f9967d
@ -45,6 +45,6 @@ Frontend implementations
|
|||||||
========================
|
========================
|
||||||
|
|
||||||
* :mod:`mopidy.frontends.http`
|
* :mod:`mopidy.frontends.http`
|
||||||
* :mod:`mopidy.frontends.lastfm`
|
* :mod:`mopidy.frontends.scrobbler`
|
||||||
* :mod:`mopidy.frontends.mpd`
|
* :mod:`mopidy.frontends.mpd`
|
||||||
* :mod:`mopidy.frontends.mpris`
|
* :mod:`mopidy.frontends.mpris`
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
***************************************************
|
|
||||||
:mod:`mopidy.frontends.lastfm` -- Last.fm Scrobbler
|
|
||||||
***************************************************
|
|
||||||
|
|
||||||
.. automodule:: mopidy.frontends.lastfm
|
|
||||||
:synopsis: Last.fm scrobbler frontend
|
|
||||||
6
docs/modules/frontends/scrobbler.rst
Normal file
6
docs/modules/frontends/scrobbler.rst
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
**********************************************
|
||||||
|
:mod:`mopidy.frontends.scrobble` -- Scrobbler
|
||||||
|
**********************************************
|
||||||
|
|
||||||
|
.. automodule:: mopidy.frontends.scrobbler
|
||||||
|
:synopsis: Music scrobbler frontend
|
||||||
@ -106,8 +106,8 @@ Scrobbling tracks to Last.fm
|
|||||||
|
|
||||||
If you want to submit the tracks you are playing to your `Last.fm
|
If you want to submit the tracks you are playing to your `Last.fm
|
||||||
<http://www.last.fm/>`_ profile, make sure you've installed the dependencies
|
<http://www.last.fm/>`_ profile, make sure you've installed the dependencies
|
||||||
found at :mod:`mopidy.frontends.lastfm` and add the following to your settings
|
found at :mod:`mopidy.frontends.scrobbler` and add the following to your
|
||||||
file::
|
settings file::
|
||||||
|
|
||||||
LASTFM_USERNAME = u'myusername'
|
LASTFM_USERNAME = u'myusername'
|
||||||
LASTFM_PASSWORD = u'mysecret'
|
LASTFM_PASSWORD = u'mysecret'
|
||||||
|
|||||||
@ -6,7 +6,7 @@ from mopidy.utils import config, formatting
|
|||||||
|
|
||||||
|
|
||||||
default_config = """
|
default_config = """
|
||||||
[lastfm]
|
[scrobbler]
|
||||||
|
|
||||||
# If the Last.fm extension should be enabled or not
|
# If the Last.fm extension should be enabled or not
|
||||||
enabled = true
|
enabled = true
|
||||||
@ -28,7 +28,7 @@ Frontend which scrobbles the music you play to your `Last.fm
|
|||||||
|
|
||||||
**Dependencies**
|
**Dependencies**
|
||||||
|
|
||||||
.. literalinclude:: ../../../requirements/lastfm.txt
|
.. literalinclude:: ../../../requirements/scrobbler.txt
|
||||||
|
|
||||||
**Default config**
|
**Default config**
|
||||||
|
|
||||||
@ -44,8 +44,8 @@ The frontend is enabled by default if all dependencies are available.
|
|||||||
|
|
||||||
class Extension(ext.Extension):
|
class Extension(ext.Extension):
|
||||||
|
|
||||||
dist_name = 'Mopidy-Lastfm'
|
dist_name = 'Mopidy-Scrobbler'
|
||||||
ext_name = 'lastfm'
|
ext_name = 'scrobbler'
|
||||||
version = mopidy.__version__
|
version = mopidy.__version__
|
||||||
|
|
||||||
def get_default_config(self):
|
def get_default_config(self):
|
||||||
@ -64,5 +64,5 @@ class Extension(ext.Extension):
|
|||||||
raise exceptions.ExtensionError('pylast library not found', e)
|
raise exceptions.ExtensionError('pylast library not found', e)
|
||||||
|
|
||||||
def get_frontend_classes(self):
|
def get_frontend_classes(self):
|
||||||
from .actor import LastfmFrontend
|
from .actor import ScrobblerFrontend
|
||||||
return [LastfmFrontend]
|
return [ScrobblerFrontend]
|
||||||
@ -13,15 +13,15 @@ try:
|
|||||||
except ImportError as import_error:
|
except ImportError as import_error:
|
||||||
raise exceptions.OptionalDependencyError(import_error)
|
raise exceptions.OptionalDependencyError(import_error)
|
||||||
|
|
||||||
logger = logging.getLogger('mopidy.frontends.lastfm')
|
logger = logging.getLogger('mopidy.frontends.scrobbler')
|
||||||
|
|
||||||
API_KEY = '2236babefa8ebb3d93ea467560d00d04'
|
API_KEY = '2236babefa8ebb3d93ea467560d00d04'
|
||||||
API_SECRET = '94d9a09c0cd5be955c4afaeaffcaefcd'
|
API_SECRET = '94d9a09c0cd5be955c4afaeaffcaefcd'
|
||||||
|
|
||||||
|
|
||||||
class LastfmFrontend(pykka.ThreadingActor, CoreListener):
|
class ScrobblerFrontend(pykka.ThreadingActor, CoreListener):
|
||||||
def __init__(self, config, core):
|
def __init__(self, config, core):
|
||||||
super(LastfmFrontend, self).__init__()
|
super(ScrobblerFrontend, self).__init__()
|
||||||
self.lastfm = None
|
self.lastfm = None
|
||||||
self.last_start_time = None
|
self.last_start_time = None
|
||||||
|
|
||||||
4
setup.py
4
setup.py
@ -29,7 +29,7 @@ setup(
|
|||||||
],
|
],
|
||||||
extras_require={
|
extras_require={
|
||||||
b'spotify': ['pyspotify >= 1.9, < 1.11'],
|
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'http': ['cherrypy >= 3.2.2', 'ws4py >= 0.2.3'],
|
||||||
b'external_mixers': ['pyserial'],
|
b'external_mixers': ['pyserial'],
|
||||||
},
|
},
|
||||||
@ -46,7 +46,7 @@ setup(
|
|||||||
],
|
],
|
||||||
b'mopidy.ext': [
|
b'mopidy.ext': [
|
||||||
'http = mopidy.frontends.http:Extension [http]',
|
'http = mopidy.frontends.http:Extension [http]',
|
||||||
'lastfm = mopidy.frontends.lastfm:Extension [lastfm]',
|
'scrobbler = mopidy.frontends.scrobbler:Extension [scrobbler]',
|
||||||
'local = mopidy.backends.local:Extension',
|
'local = mopidy.backends.local:Extension',
|
||||||
'mpd = mopidy.frontends.mpd:Extension',
|
'mpd = mopidy.frontends.mpd:Extension',
|
||||||
'mpris = mopidy.frontends.mpris:Extension',
|
'mpris = mopidy.frontends.mpris:Extension',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user