X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fplugins%2Finternal%2Flastfm.py;h=ba10a48b063eb1701bf0bece1b89f255127b752b;hb=63563d000f2646724c1ff91eb6fcca01f5201d23;hp=2e6fca6b7fdc3c008a41b650338050ae78643484;hpb=df9f0f9dae0f8712f672b4eb7f4211e62f6c2e21;p=mpd-sima.git diff --git a/sima/plugins/internal/lastfm.py b/sima/plugins/internal/lastfm.py index 2e6fca6..ba10a48 100644 --- a/sima/plugins/internal/lastfm.py +++ b/sima/plugins/internal/lastfm.py @@ -22,12 +22,14 @@ Fetching similar artists from last.fm web services """ # standard library import +from os.path import join # third parties components # local import from ...lib.simafm import SimaFM from ...lib.webserv import WebService +from ...lib.cache import FileCache class Lastfm(WebService): @@ -37,6 +39,9 @@ class Lastfm(WebService): def __init__(self, daemon): WebService.__init__(self, daemon) self.ws = SimaFM + # Set persitent cache + vardir = daemon.config['sima']['var_dir'] + SimaFM.cache = FileCache(join(vardir, 'http', 'LastFM')) # VIM MODLINE