X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fplugins%2Finternal%2Flastfm.py;h=81a2b1cb7f2db8f315843a51803be248b6999ee8;hb=5aa6ec2f4b449797fbe8269c0d8d7da66bd2c9bc;hp=66ced0442591bff8e9a663de66c53ea29541217c;hpb=418a891bc69e8729f327e0c9fc38e45786ade65d;p=mpd-sima.git diff --git a/sima/plugins/internal/lastfm.py b/sima/plugins/internal/lastfm.py index 66ced04..81a2b1c 100644 --- a/sima/plugins/internal/lastfm.py +++ b/sima/plugins/internal/lastfm.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2013, 2014 Jack Kaliko +# Copyright (c) 2013, 2014, 2020 kaliko # # This file is part of sima # @@ -29,7 +29,8 @@ from os.path import join # local import from ...lib.simafm import SimaFM from ...lib.webserv import WebService -from ...lib.cache import FileCache, DictCache +from ...lib.cache import FileCache +from ...lib.http import CacheController class Lastfm(WebService): @@ -42,7 +43,8 @@ class Lastfm(WebService): vardir = daemon.config['sima']['var_dir'] persitent_cache = daemon.config.getboolean('lastfm', 'cache') if persitent_cache: - self.log.debug('Persistant cache enabled in {}'.format(join(vardir, 'http', 'LastFM'))) + CacheController.CACHE_ANYWAY = True + self.log.debug('Persistant cache enabled in %s', join(vardir, 'http', 'LastFM')) SimaFM.cache = FileCache(join(vardir, 'http', 'LastFM')) self.ws = SimaFM()