From b47f62108f8514b3bdc018aa3b28163cdde39b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Wed, 29 Nov 2017 22:30:09 -0500 Subject: [PATCH] Use dogpile.cache memory db if windows --- get_subtitle.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/get_subtitle.py b/get_subtitle.py index 74d817340..48c1c9e12 100644 --- a/get_subtitle.py +++ b/get_subtitle.py @@ -9,8 +9,10 @@ from list_subtitles import * from utils import * # configure the cache -#region.configure('dogpile.cache.dbm', arguments={'filename': os.path.join(os.path.dirname(__file__), 'data/cache/cachefile.dbm')}) -region.configure('dogpile.cache.memory') +if os.name == 'nt': + region.configure('dogpile.cache.memory') +else: + region.configure('dogpile.cache.dbm', arguments={'filename': os.path.join(os.path.dirname(__file__), 'data/cache/cachefile.dbm')}) def download_subtitle(path, language, hi, providers): video = scan_video(path)