From af8ea6934bdae6f618263bb561c7bfca4e1ccb20 Mon Sep 17 00:00:00 2001 From: panni Date: Fri, 26 May 2017 03:20:19 +0200 Subject: [PATCH] add config.dbm_supported --- Contents/Code/interface/menu.py | 2 +- Contents/Code/support/config.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Contents/Code/interface/menu.py b/Contents/Code/interface/menu.py index aa8d6f41..55fb80ef 100644 --- a/Contents/Code/interface/menu.py +++ b/Contents/Code/interface/menu.py @@ -201,7 +201,7 @@ def ValidatePrefs(): for attr in [ "app_support_path", "data_path", "data_items_path", "enable_agent", "enable_channel", "permissions_ok", "missing_permissions", "fs_encoding", "enforce_encoding", - "subtitle_destination_folder"]: + "subtitle_destination_folder", "dbm_supported"]: Log.Debug("config.%s: %s", attr, getattr(config, attr)) for attr in ["plugin_log_path", "server_log_path"]: diff --git a/Contents/Code/support/config.py b/Contents/Code/support/config.py index 2a33e117..d52cb200 100644 --- a/Contents/Code/support/config.py +++ b/Contents/Code/support/config.py @@ -52,6 +52,7 @@ class Config(object): universal_plex_token = None plex_token = None is_development = False + dbm_supported = False enable_channel = True enable_agent = True @@ -148,6 +149,7 @@ class Config(object): use_fallback_cache = True names = ['dbhash', 'gdbm', 'dbm', 'dumbdbm'] defaultmod = None + self.dbm_supported = False if impawrt: for name in names: @@ -164,6 +166,7 @@ class Config(object): arguments={'filename': os.path.join(config.data_items_path, 'subzero.dbm'), 'lock_factory': MutexLock}) use_fallback_cache = False + self.dbm_supported = True Log.Info("Using file based cache!") except: pass