Fix conversion of spotify backend to xdg locations
This commit is contained in:
parent
3468feb1a9
commit
c112e6d5df
@ -20,13 +20,14 @@ from mopidy.utils.process import BaseThread
|
|||||||
logger = logging.getLogger('mopidy.backends.spotify.session_manager')
|
logger = logging.getLogger('mopidy.backends.spotify.session_manager')
|
||||||
|
|
||||||
DEFAULT_CACHE_LOCATION = os.path.join(glib.get_user_cache_dir(), 'spotify')
|
DEFAULT_CACHE_LOCATION = os.path.join(glib.get_user_cache_dir(), 'spotify')
|
||||||
|
DEFAULT_SETTINGS_LOCATION = DEFAULT_CACHE_LOCATION
|
||||||
|
|
||||||
# pylint: disable = R0901
|
# pylint: disable = R0901
|
||||||
# SpotifySessionManager: Too many ancestors (9/7)
|
# SpotifySessionManager: Too many ancestors (9/7)
|
||||||
|
|
||||||
|
|
||||||
class SpotifySessionManager(BaseThread, PyspotifySessionManager):
|
class SpotifySessionManager(BaseThread, PyspotifySessionManager):
|
||||||
cache_location = settings.SPOTIFY_CACHE_PATH
|
cache_location = settings.SPOTIFY_CACHE_PATH or DEFAULT_SETTINGS_LOCATION
|
||||||
settings_location = settings.SPOTIFY_CACHE_PATH or DEFAULT_CACHE_LOCATION
|
settings_location = settings.SPOTIFY_CACHE_PATH or DEFAULT_CACHE_LOCATION
|
||||||
appkey_file = os.path.join(os.path.dirname(__file__), 'spotify_appkey.key')
|
appkey_file = os.path.join(os.path.dirname(__file__), 'spotify_appkey.key')
|
||||||
user_agent = 'Mopidy %s' % get_version()
|
user_agent = 'Mopidy %s' % get_version()
|
||||||
|
|||||||
@ -237,7 +237,7 @@ SHOUTCAST_OUTPUT_ENCODER = u'lame mode=stereo bitrate=320'
|
|||||||
#: Path to the Spotify cache.
|
#: Path to the Spotify cache.
|
||||||
#:
|
#:
|
||||||
#: Used by :mod:`mopidy.backends.spotify`.
|
#: Used by :mod:`mopidy.backends.spotify`.
|
||||||
SPOTIFY_CACHE_PATH = u''
|
SPOTIFY_CACHE_PATH = None
|
||||||
|
|
||||||
#: Your Spotify Premium username.
|
#: Your Spotify Premium username.
|
||||||
#:
|
#:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user