X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fplugins%2Finternal%2Flastfm.py;h=125f0090291655dc60656998b5a541a36869e6cd;hb=1c01e4a7aa37eeef825c6918fc90b154a7f4ccc7;hp=f6008dc4388bff3347ba95ec681cfd4826bcf810;hpb=1b5cfb4c9187df891bd840b51c044d72ad0077d5;p=mpd-sima.git diff --git a/sima/plugins/internal/lastfm.py b/sima/plugins/internal/lastfm.py index f6008dc..125f009 100644 --- a/sima/plugins/internal/lastfm.py +++ b/sima/plugins/internal/lastfm.py @@ -29,7 +29,7 @@ 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 class Lastfm(WebService): @@ -38,14 +38,13 @@ class Lastfm(WebService): def __init__(self, daemon): WebService.__init__(self, daemon) - self.ws = SimaFM() # Set persitent cache 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'))) SimaFM.cache = FileCache(join(vardir, 'http', 'LastFM')) - else: - SimaFM.cache = DictCache() + self.ws = SimaFM() # VIM MODLINE