Fix conversion of spotify backend to xdg locations

This commit is contained in:
Thomas Adamcik 2011-07-17 02:19:18 +02:00
parent 3468feb1a9
commit c112e6d5df
2 changed files with 3 additions and 2 deletions

View File

@ -20,13 +20,14 @@ from mopidy.utils.process import BaseThread
logger = logging.getLogger('mopidy.backends.spotify.session_manager')
DEFAULT_CACHE_LOCATION = os.path.join(glib.get_user_cache_dir(), 'spotify')
DEFAULT_SETTINGS_LOCATION = DEFAULT_CACHE_LOCATION
# pylint: disable = R0901
# SpotifySessionManager: Too many ancestors (9/7)
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
appkey_file = os.path.join(os.path.dirname(__file__), 'spotify_appkey.key')
user_agent = 'Mopidy %s' % get_version()

View File

@ -237,7 +237,7 @@ SHOUTCAST_OUTPUT_ENCODER = u'lame mode=stereo bitrate=320'
#: Path to the Spotify cache.
#:
#: Used by :mod:`mopidy.backends.spotify`.
SPOTIFY_CACHE_PATH = u''
SPOTIFY_CACHE_PATH = None
#: Your Spotify Premium username.
#: