diff --git a/data/interfaces/brink/config.html b/data/interfaces/brink/config.html index 7aceed00..c92d3eaa 100644 --- a/data/interfaces/brink/config.html +++ b/data/interfaces/brink/config.html @@ -559,6 +559,15 @@ + + + + + + + + + diff --git a/data/interfaces/classic/config.html b/data/interfaces/classic/config.html index 4d2a4b16..9a5e92a3 100644 --- a/data/interfaces/classic/config.html +++ b/data/interfaces/classic/config.html @@ -342,6 +342,8 @@

Log Directory:

+

+

Cache Directory:

diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html index edbf1834..2e73a845 100644 --- a/data/interfaces/default/config.html +++ b/data/interfaces/default/config.html @@ -573,6 +573,10 @@ m<%inherit file="base.html"/> +
+ + +
diff --git a/data/interfaces/remix/config.html b/data/interfaces/remix/config.html index 4d2a4b16..9a5e92a3 100644 --- a/data/interfaces/remix/config.html +++ b/data/interfaces/remix/config.html @@ -342,6 +342,8 @@

Log Directory:

+

+

Cache Directory:

diff --git a/headphones/__init__.py b/headphones/__init__.py index b22ad120..aeea9001 100644 --- a/headphones/__init__.py +++ b/headphones/__init__.py @@ -300,6 +300,7 @@ def initialize(): API_KEY = check_setting_str(CFG, 'General', 'api_key', '') GIT_PATH = check_setting_str(CFG, 'General', 'git_path', '') LOG_DIR = check_setting_str(CFG, 'General', 'log_dir', '') + CACHE_DIR = check_setting_str(CFG, 'General', 'cache_dir', '') CHECK_GITHUB = bool(check_setting_int(CFG, 'General', 'check_github', 1)) CHECK_GITHUB_ON_STARTUP = bool(check_setting_int(CFG, 'General', 'check_github_on_startup', 1)) @@ -477,8 +478,9 @@ def initialize(): # Start the logger, silence console logging if we need to logger.headphones_log.initLogger(verbose=VERBOSE) - # Put the cache dir in the data dir for now - CACHE_DIR = os.path.join(DATA_DIR, 'cache') + if not CACHE_DIR: + # Put the cache dir in the data dir for now + CACHE_DIR = os.path.join(DATA_DIR, 'cache') if not os.path.exists(CACHE_DIR): try: os.makedirs(CACHE_DIR) @@ -584,6 +586,7 @@ def config_write(): new_config['General']['api_enabled'] = int(API_ENABLED) new_config['General']['api_key'] = API_KEY new_config['General']['log_dir'] = LOG_DIR + new_config['General']['cache_dir'] = CACHE_DIR new_config['General']['git_path'] = GIT_PATH new_config['General']['check_github'] = int(CHECK_GITHUB) diff --git a/headphones/webserve.py b/headphones/webserve.py index d985dc2b..c445ea2e 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -489,6 +489,7 @@ class WebInterface(object): "autowant_upcoming" : checked(headphones.AUTOWANT_UPCOMING), "autowant_all" : checked(headphones.AUTOWANT_ALL), "log_dir" : headphones.LOG_DIR, + "cache_dir" : headphones.CACHE_DIR, "interface_list" : interface_list, "music_encoder": checked(headphones.MUSIC_ENCODER), "encoder": headphones.ENCODER, @@ -551,7 +552,7 @@ class WebInterface(object): numberofseeders=10, use_isohunt=0, use_kat=0, use_mininova=0, waffles=0, waffles_uid=None, waffles_passkey=None, rutracker=0, rutracker_user=None, rutracker_password=None, rename_files=0, correct_metadata=0, cleanup_files=0, add_album_art=0, embed_album_art=0, embed_lyrics=0, destination_dir=None, lossless_destination_dir=None, folder_format=None, file_format=None, include_extras=0, single=0, ep=0, compilation=0, soundtrack=0, live=0, remix=0, spokenword=0, audiobook=0, autowant_upcoming=False, autowant_all=False, - interface=None, log_dir=None, music_encoder=0, encoder=None, bitrate=None, samplingfrequency=None, encoderfolder=None, advancedencoder=None, + interface=None, log_dir=None, cache_dir=None, music_encoder=0, encoder=None, bitrate=None, samplingfrequency=None, encoderfolder=None, advancedencoder=None, encoderoutputformat=None, encodervbrcbr=None, encoderquality=None, encoderlossless=0, delete_lossless_files=0, prowl_enabled=0, prowl_onsnatch=0, prowl_keys=None, prowl_priority=0, xbmc_enabled=0, xbmc_host=None, xbmc_username=None, xbmc_password=None, xbmc_update=0, xbmc_notify=0, nma_enabled=False, nma_apikey=None, nma_priority=0, nma_onsnatch=0, synoindex_enabled=False, mirror=None, customhost=None, customport=None, customsleep=None, hpuser=None, hppass=None, @@ -622,6 +623,7 @@ class WebInterface(object): headphones.AUTOWANT_ALL = autowant_all headphones.INTERFACE = interface headphones.LOG_DIR = log_dir + headphones.CACHE_DIR = cache_dir headphones.MUSIC_ENCODER = music_encoder headphones.ENCODER = encoder headphones.BITRATE = int(bitrate)