Use dogpile.cache memory db if windows

This commit is contained in:
Louis Vézina 2017-11-29 22:30:09 -05:00
parent e1a1aa2ac8
commit b47f62108f
1 changed files with 4 additions and 2 deletions

View File

@ -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)