diff --git a/MANIFEST.in b/MANIFEST.in index 8a73b481..38819adb 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include LICENSE pylintrc *.rst *.txt +include mopidy/backends/libspotify/spotify_appkey.key recursive-include docs * prune docs/_build recursive-include tests *.py diff --git a/docs/changes.rst b/docs/changes.rst index 7b154915..c20b2ad1 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -23,6 +23,8 @@ Another great release. - Remove :mod:`mopidy.backends.despotify`, as Despotify is little maintained and the Libspotify backend is working much better. - :mod:`mopidy.backends.libspotify` is now the default backend. +- A Spotify application key is now bundled with the source. The + ``SPOTIFY_LIB_APPKEY`` setting is thus removed. - MPD frontend: - Relocate from :mod:`mopidy.mpd` to :mod:`mopidy.frontends.mpd`. diff --git a/mopidy/backends/libspotify/session_manager.py b/mopidy/backends/libspotify/session_manager.py index 2de6ae63..707423aa 100644 --- a/mopidy/backends/libspotify/session_manager.py +++ b/mopidy/backends/libspotify/session_manager.py @@ -13,7 +13,7 @@ logger = logging.getLogger('mopidy.backends.libspotify.session_manager') class LibspotifySessionManager(SpotifySessionManager, threading.Thread): cache_location = os.path.expanduser(settings.SPOTIFY_LIB_CACHE) settings_location = os.path.expanduser(settings.SPOTIFY_LIB_CACHE) - appkey_file = os.path.expanduser(settings.SPOTIFY_LIB_APPKEY) + appkey_file = os.path.join(os.path.dirname(__file__), 'spotify_appkey.key') user_agent = 'Mopidy %s' % get_version() def __init__(self, username, password, core_queue, output_queue): diff --git a/mopidy/backends/libspotify/spotify_appkey.key b/mopidy/backends/libspotify/spotify_appkey.key new file mode 100644 index 00000000..1f840b96 Binary files /dev/null and b/mopidy/backends/libspotify/spotify_appkey.key differ diff --git a/mopidy/settings.py b/mopidy/settings.py index 949b2e06..b17af913 100644 --- a/mopidy/settings.py +++ b/mopidy/settings.py @@ -160,11 +160,6 @@ MPD_SERVER_HOSTNAME = u'127.0.0.1' #: Default: 6600 MPD_SERVER_PORT = 6600 -#: Path to your libspotify application key. -#: -#: Used by :mod:`mopidy.backends.libspotify`. -SPOTIFY_LIB_APPKEY = u'~/.mopidy/spotify_appkey.key' - #: Path to the libspotify cache. #: #: Used by :mod:`mopidy.backends.libspotify`. diff --git a/setup.py b/setup.py index 76c38e4b..fabc8353 100644 --- a/setup.py +++ b/setup.py @@ -75,6 +75,7 @@ setup( author='Stein Magnus Jodal', author_email='stein.magnus@jodal.no', packages=packages, + package_data={'mopidy': ['backends/libspotify/spotify_appkey.key']}, cmdclass=cmdclasses, data_files=data_files, scripts=['bin/mopidy'],