diff --git a/sabnzbd/cfg.py b/sabnzbd/cfg.py index bc37c2b..8370072 100644 --- a/sabnzbd/cfg.py +++ b/sabnzbd/cfg.py @@ -261,6 +261,7 @@ fixed_ports = OptionBool('misc', 'fixed_ports', False) api_warnings = OptionBool('misc', 'api_warnings', True, protect=True) disable_key = OptionBool('misc', 'disable_api_key', False, protect=True) no_penalties = OptionBool('misc', 'no_penalties', False) +debug_log_decoding = OptionBool('misc', 'debug_log_decoding', False) # Text values rss_odd_titles = OptionList('misc', 'rss_odd_titles', ['nzbindex.nl/', 'nzbindex.com/', 'nzbclub.com/']) diff --git a/sabnzbd/decoder.py b/sabnzbd/decoder.py index 86f33f0..86bb306 100644 --- a/sabnzbd/decoder.py +++ b/sabnzbd/decoder.py @@ -31,6 +31,7 @@ from sabnzbd.constants import Status, MAX_DECODE_QUEUE, LIMIT_DECODE_QUEUE, SABY import sabnzbd.articlecache import sabnzbd.downloader import sabnzbd.nzbqueue +import sabnzbd.cfg as cfg from sabnzbd.encoding import yenc_name_fixer from sabnzbd.misc import match_str @@ -79,6 +80,7 @@ class Decoder(Thread): self.queue = queue self.servers = servers + self.__log_decoding = cfg.debug_log_decoding() def stop(self): # Put multiple to stop all decoders @@ -115,7 +117,9 @@ class Decoder(Thread): if nzo.precheck: raise BadYenc register = True - logging.debug("Decoding %s", art_id) + + if self.__log_decoding: + logging.debug("Decoding %s", art_id) data = self.decode(article, lines, raw_data) nzf.article_count += 1 diff --git a/sabnzbd/interface.py b/sabnzbd/interface.py index 7afbd46..e45b110 100644 --- a/sabnzbd/interface.py +++ b/sabnzbd/interface.py @@ -1373,7 +1373,7 @@ class ConfigSwitches(object): SPECIAL_BOOL_LIST = \ ('start_paused', 'no_penalties', 'ignore_wrong_unrar', 'overwrite_files', 'enable_par_cleanup', 'queue_complete_pers', 'api_warnings', 'ampm', 'enable_unrar', 'enable_unzip', 'enable_7zip', - 'enable_filejoin', 'enable_tsjoin', 'ignore_unrar_dates', + 'enable_filejoin', 'enable_tsjoin', 'ignore_unrar_dates', 'debug_log_decoding', 'multipar', 'osx_menu', 'osx_speed', 'win_menu', 'use_pickle', 'allow_incomplete_nzb', 'rss_filenames', 'ipv6_hosting', 'keep_awake', 'empty_postproc', 'html_login', 'wait_for_dfolder', 'max_art_opt', 'warn_empty_nzb', 'enable_bonjour', 'reject_duplicate_files', 'warn_dupl_jobs',