diff options
author | Michiel van Baak <[email protected]> | 2021-03-14 11:34:31 +0100 |
---|---|---|
committer | Michiel van Baak <[email protected]> | 2021-03-14 11:34:31 +0100 |
commit | 75d49e2f3366871bd694fe981ae271f8f1a19600 (patch) | |
tree | b19ac853a021b2e4701b7084d78b1da1c28da006 | |
parent | f10bac1fad0c3a147483e151b4115b3d45fe1442 (diff) | |
download | bazarr-75d49e2f3366871bd694fe981ae271f8f1a19600.tar.gz bazarr-75d49e2f3366871bd694fe981ae271f8f1a19600.zip |
Revert "Use dogpile.cache sha1_mangle_key to mangle cache keys"
This reverts commit 7789f8c1a03f15bdc23d74c511000832f52091ed.
-rw-r--r-- | bazarr/init.py | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/bazarr/init.py b/bazarr/init.py index bfe2d07f9..4ef90ffdb 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -11,9 +11,7 @@ from get_args import args from logger import configure_logging from helper import path_mappings -from dogpile.cache import make_region from dogpile.cache.region import register_backend as register_cache_backend -from dogpile.cache.util import sha1_mangle_key import subliminal import datetime @@ -111,19 +109,12 @@ if not os.path.exists(os.path.join(args.config_dir, 'db', 'bazarr.db')): # upgrade database schema from database import db_upgrade - db_upgrade() # Configure dogpile file caching for Subliminal request register_cache_backend("subzero.cache.file", "subzero.cache_backends.file", "SZFileBackend") - -subliminal.region = make_region( - key_mangler=sha1_mangle_key -).configure( - 'subzero.cache.file', - expiration_time=datetime.timedelta(days=30), - arguments={'appname': "sz_cache", 'app_cache_dir': args.config_dir} -) +subliminal.region.configure('subzero.cache.file', expiration_time=datetime.timedelta(days=30), + arguments={'appname': "sz_cache", 'app_cache_dir': args.config_dir}) subliminal.region.backend.sync() if not os.path.exists(os.path.join(args.config_dir, 'config', 'releases.txt')): @@ -186,20 +177,20 @@ with open(os.path.normpath(os.path.join(args.config_dir, 'config', 'config.ini') def init_binaries(): from utils import get_binary exe = get_binary("unrar") - + rarfile.UNRAR_TOOL = exe rarfile.ORIG_UNRAR_TOOL = exe try: rarfile.custom_check([rarfile.UNRAR_TOOL], True) except: logging.debug("custom check failed for: %s", exe) - + rarfile.OPEN_ARGS = rarfile.ORIG_OPEN_ARGS rarfile.EXTRACT_ARGS = rarfile.ORIG_EXTRACT_ARGS rarfile.TEST_ARGS = rarfile.ORIG_TEST_ARGS logging.debug("Using UnRAR from: %s", exe) unrar = exe - + return unrar |