diff --git a/ABOUT.txt b/ABOUT.txt index 9acfd42..e72c1b1 100644 --- a/ABOUT.txt +++ b/ABOUT.txt @@ -1,5 +1,5 @@ ******************************************* -*** This is SABnzbd 2.4.0 *** +*** This is SABnzbd 2.3.4 *** ******************************************* SABnzbd is an open-source cross-platform binary newsreader. It simplifies the process of downloading from Usenet dramatically, diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index d64c5b9..3d94641 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -1,5 +1,5 @@ -(c) Copyright 2007-2017 by "The SABnzbd-team" +(c) Copyright 2007-2018 by "The SABnzbd-team" The SABnzbd-team is: diff --git a/INSTALL.txt b/INSTALL.txt index c66b43c..848b58e 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -1,10 +1,10 @@ - SABnzbd 2.3.1 + SABnzbd 2.3.4 ------------------------------------------------------------------------------- 0) LICENSE ------------------------------------------------------------------------------- -(c) Copyright 2007-2017 by "The SABnzbd-team" +(c) Copyright 2007-2018 by "The SABnzbd-team" This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/LICENSE.txt b/LICENSE.txt index 372501c..55d9b20 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -(c) Copyright 2007-2017 by "The SABnzbd-team" +(c) Copyright 2007-2018 by "The SABnzbd-team" This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/README.mkd b/README.mkd index 85dad57..9761d7b 100644 --- a/README.mkd +++ b/README.mkd @@ -1,48 +1,18 @@ -Release Notes - SABnzbd 2.3.1 +Release Notes - SABnzbd 2.3.4 ========================================================= -## Changes since 2.3.0 -- Added post-processing script Deobfuscate.py (in "scripts" folder) - which can automatically process "rename.par2" after unpacking - or rename the largest file in the folder to the job's name -- Maximum Article Cache size increased to 4GB on 64 bit systems -- New servers will have timeout of 60 seconds instead of 120 -- Last output of a running script is shown in history -- Paths to par2, unrar, unzip and 7zip are passed to scripts -- Path to gzipped NZB file of job is passed to scripts -- Windows: Single click on tray icon pauses/unpauses queue - -## Bugfixes since 2.3.0 -- Abort Direct Unpack if not progressing 2 minutes after download -- Direct Unpacker could crash on some downloads -- Added measures to prevent "Failed to import" errors -- Downloader could crash during first few seconds after start -- Saving errors of renames-file prevented -- More verbose logging of creating and deleting files -- Remove ".par2" at end of job name, could cause failure of repair -- Fix racing-condition for files coming in after a job finishes -- When re-adding a job, the time left was not calculated -- Priority of category was ignored when adding new job -- Server information in Status window was not always updated -- Always show Direct Unpack status on smaller screens -- Correctly adapt date and time display to local time zone -- Category folders cannot be sub-folders of Temporary Download Folder -- Email notifications could not be limited to categories -- Testing email notifications did not work -- Added "with" to list of lowercase words in titles for Sorting -- "From SxxEyy" RSS filter did not always work -- Show clearly that RSS "From Show SxxEyy" is an "Accept"-type filter -- Sorting failed when "Ignore folders inside archives" was enabled -- Always send "failure_url" to post-processing scripts -- Decoding of articles no longer logged by default to reduce logging -- Windows: Remove incompatible "Extra Par2 Parameters" for MultiPar -- Windows: Special filenames could cause failures during unpack -- Windows: Message box is shown in case of fatal startup error -- Windows: Unpacking to network shares could fail -- macOS: Added Safari pinned tab icon - -In case of "Article DB missing/empty" errors, enable +Debug logging -and report here: https://github.com/sabnzbd/sabnzbd/issues/952 +## Changes since 2.3.3 +- Device hostname in hostname-verification always lowercased +- Hostnames ending in ".local" are always accepted +- URLGrabber would not always detect correct filename +- URLGrabber would ignore some successful downloads +- Always send NNTP QUIT after server-test +- Added option "--disable-file-log" to disable file-based logging +- Added CORS-header to API +- Windows: Service compatibility with Windows 10 April update +- Windows: Update Python to 2.7.15 +- Windows: Update 7zip to 18.05 +- macOS: Restore compatibility with El Capitan (10.11) ## Upgrading from 2.2.x and older - Finish queue @@ -68,4 +38,4 @@ and report here: https://github.com/sabnzbd/sabnzbd/issues/952 that automatically verify, repair, extract and clean up posts downloaded from Usenet. - (c) Copyright 2007-2017 by "The SABnzbd-team" \ + (c) Copyright 2007-2018 by "The SABnzbd-team" \ diff --git a/SABHelper.py b/SABHelper.py index 7196932..cce97c5 100644 --- a/SABHelper.py +++ b/SABHelper.py @@ -1,5 +1,5 @@ #!/usr/bin/python -OO -# Copyright 2008-2017 The SABnzbd-Team +# Copyright 2007-2018 The SABnzbd-Team # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/SABnzbd.py b/SABnzbd.py index 7f9d61b..90e4253 100755 --- a/SABnzbd.py +++ b/SABnzbd.py @@ -1,5 +1,5 @@ #!/usr/bin/python -OO -# Copyright 2008-2017 The SABnzbd-Team +# Copyright 2007-2018 The SABnzbd-Team # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -186,6 +186,7 @@ def print_help(): print(" --ipv6_hosting <0|1> Listen on IPv6 address [::1] [*]") print(" --no-login Start with username and password reset") print(" --log-all Log all article handling (for developers)") + print(" --disable-file-log Logging is only written to console") print(" --console Force console logging for OSX app") print(" --new Run a new instance of SABnzbd") @@ -194,7 +195,7 @@ def print_version(): print((""" %s-%s -Copyright (C) 2008-2017, The SABnzbd-Team +Copyright (C) 2007-2018, The SABnzbd-Team SABnzbd comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. It is licensed under the @@ -375,7 +376,7 @@ def print_modules(): """ Log all detected optional or external modules """ if sabnzbd.decoder.SABYENC_ENABLED: # Yes, we have SABYenc, and it's the correct version, so it's enabled - logging.info("SABYenc module (v%s)... found!", sabnzbd.constants.SABYENC_VERSION_REQUIRED) + logging.info("SABYenc module (v%s)... found!", sabnzbd.decoder.SABYENC_VERSION) else: # Something wrong with SABYenc, so let's determine and print what: if sabnzbd.decoder.SABYENC_VERSION: @@ -734,7 +735,7 @@ def commandline_handler(frozen=True): opts, args = getopt.getopt(info, "phdvncwl:s:f:t:b:2:", ['pause', 'help', 'daemon', 'nobrowser', 'clean', 'logging=', 'weblogging', 'server=', 'templates', 'ipv6_hosting=', - 'template2', 'browser=', 'config-file=', 'force', + 'template2', 'browser=', 'config-file=', 'force', 'disable-file-log', 'version', 'https=', 'autorestarted', 'repair', 'repair-all', 'log-all', 'no-login', 'pid=', 'new', 'console', 'pidfile=', # Below Win32 Service options @@ -753,7 +754,7 @@ def commandline_handler(frozen=True): if not service: # Get and remove any NZB file names for entry in args: - if get_ext(entry) in ('.nzb', '.zip', '.rar', '.gz', '.bz2'): + if get_ext(entry) in VALID_NZB_FILES + VALID_ARCHIVES: upload_nzbs.append(os.path.abspath(entry)) for opt, arg in opts: @@ -797,6 +798,7 @@ def main(): cherrypylogging = None clean_up = False logging_level = None + no_file_log = False web_dir = None vista_plus = False win64 = False @@ -870,6 +872,8 @@ def main(): pause = True elif opt in ('--log-all',): sabnzbd.LOG_ALL = True + elif opt in ('--disable-file-log'): + no_file_log = True elif opt in ('--no-login',): no_login = True elif opt in ('--pid',): @@ -1053,11 +1057,7 @@ def main(): # We found a port, now we never check again sabnzbd.cfg.fixed_ports.set(True) - if logging_level is None: - logging_level = sabnzbd.cfg.log_level() - else: - sabnzbd.cfg.log_level.set(logging_level) - + # Logging-checks logdir = sabnzbd.cfg.log_dir.get_path() if fork and not logdir: print("Error: I refuse to fork without a log directory!") @@ -1075,19 +1075,24 @@ def main(): # Prevent the logger from raising exceptions # primarily to reduce the fallout of Python issue 4749 logging.raiseExceptions = 0 + + # Log-related constants we always need + if logging_level is None: + logging_level = sabnzbd.cfg.log_level() + else: + sabnzbd.cfg.log_level.set(logging_level) sabnzbd.LOGFILE = os.path.join(logdir, DEF_LOG_FILE) + logformat = '%(asctime)s::%(levelname)s::[%(module)s:%(lineno)d] %(message)s' + logger.setLevel(LOGLEVELS[logging_level + 1]) try: - rollover_log = logging.handlers.RotatingFileHandler( - sabnzbd.LOGFILE, 'a+', - sabnzbd.cfg.log_size.get_int(), - sabnzbd.cfg.log_backups()) - - logformat = '%(asctime)s::%(levelname)s::[%(module)s:%(lineno)d] %(message)s' - rollover_log.setFormatter(logging.Formatter(logformat)) - sabnzbd.LOGHANDLER = rollover_log - logger.addHandler(rollover_log) - logger.setLevel(LOGLEVELS[logging_level + 1]) + if not no_file_log: + rollover_log = logging.handlers.RotatingFileHandler( + sabnzbd.LOGFILE, 'a+', + sabnzbd.cfg.log_size.get_int(), + sabnzbd.cfg.log_backups()) + rollover_log.setFormatter(logging.Formatter(logformat)) + logger.addHandler(rollover_log) except IOError: print("Error:") @@ -1117,6 +1122,8 @@ def main(): console.setLevel(LOGLEVELS[logging_level + 1]) console.setFormatter(logging.Formatter(logformat)) logger.addHandler(console) + if no_file_log: + logging.info('Console logging only') if noConsoleLoggingOSX: logging.info('Console logging for OSX App disabled') so = file('/dev/null', 'a+') @@ -1335,8 +1342,11 @@ def main(): staticcfg = {'tools.staticdir.on': True, 'tools.staticdir.dir': os.path.join(sabnzbd.WEB_DIR_CONFIG, 'staticcfg'), 'tools.staticdir.content_types': forced_mime_types} wizard_static = {'tools.staticdir.on': True, 'tools.staticdir.dir': os.path.join(sabnzbd.WIZARD_DIR, 'static'), 'tools.staticdir.content_types': forced_mime_types} - appconfig = {'/api': {'tools.basic_auth.on': False}, - '/rss': {'tools.basic_auth.on': False}, + appconfig = {'/api': { + 'tools.basic_auth.on': False, + 'tools.response_headers.on': True, + 'tools.response_headers.headers': [('Access-Control-Allow-Origin', '*')] + }, '/static': static, '/wizard/static': wizard_static, '/favicon.ico': {'tools.staticfile.on': True, 'tools.staticfile.filename': os.path.join(sabnzbd.WEB_DIR_CONFIG, 'staticcfg', 'ico', 'favicon.ico')}, @@ -1487,9 +1497,7 @@ def main(): # Or special restart cases like Mac and WindowsService if sabnzbd.TRIGGER_RESTART: # Shutdown - cherrypy.engine.exit() - sabnzbd.halt() - sabnzbd.SABSTOP = True + sabnzbd.shutdown_program() if sabnzbd.downloader.Downloader.do.paused: sabnzbd.RESTART_ARGS.append('-p') @@ -1696,9 +1704,7 @@ if __name__ == '__main__': def stop(self): logging.info('[osx] sabApp Quit - stopping main thread ') - sabnzbd.halt() - cherrypy.engine.exit() - sabnzbd.SABSTOP = True + sabnzbd.shutdown_program() logging.info('[osx] sabApp Quit - main thread stopped') sabApp = startApp() diff --git a/interfaces/Config/templates/config.tmpl b/interfaces/Config/templates/config.tmpl index 58a482c..aae4e9c 100644 --- a/interfaces/Config/templates/config.tmpl +++ b/interfaces/Config/templates/config.tmpl @@ -72,7 +72,7 @@ - + $T('opt-enable_unzip'): @@ -133,7 +133,7 @@
- +
diff --git a/interfaces/Config/templates/config_folders.tmpl b/interfaces/Config/templates/config_folders.tmpl index 5095235..a831cea 100644 --- a/interfaces/Config/templates/config_folders.tmpl +++ b/interfaces/Config/templates/config_folders.tmpl @@ -3,6 +3,11 @@
+
+ +
@@ -21,7 +26,7 @@ $T('explain-download_dir')
-
+
$T('explain-download_free') @@ -32,7 +37,7 @@ $T('explain-complete_dir')
-
+
$T('explain-permissions') @@ -43,7 +48,7 @@ $T('explain-dirscan_dir')
-
+
$T('explain-dirscan_speed') @@ -53,12 +58,12 @@ $T('explain-script_dir')
-
+
$T('explain-email_dir')
-
+
$T('explain-password_file') @@ -72,7 +77,7 @@
-
+

$T('systemFolders')

$T('explain-folderConfig')

diff --git a/interfaces/Config/templates/config_general.tmpl b/interfaces/Config/templates/config_general.tmpl index ac49015..8afd35f 100644 --- a/interfaces/Config/templates/config_general.tmpl +++ b/interfaces/Config/templates/config_general.tmpl @@ -3,6 +3,11 @@
+
+ +
@@ -28,7 +33,7 @@ 0 then 'checked="checked" data-original="1"' else ""#-->/> $T('explain-enable_https')
-
+
$T('explain-check_new_rel')
-
"> +
"> 0 then 'checked="checked"' else ""#--> /> $T('explain-enable_https_verification') @@ -200,12 +204,12 @@
-
+
$T('explain-bandwidth_perc')
-
+
$T('explain-cache_limitstr').replace("64M", "256M").replace("128M", "512M") diff --git a/interfaces/Config/templates/config_notify.tmpl b/interfaces/Config/templates/config_notify.tmpl index ce6bc32..e1393ca 100644 --- a/interfaces/Config/templates/config_notify.tmpl +++ b/interfaces/Config/templates/config_notify.tmpl @@ -91,7 +91,7 @@ $T('explain-email_pwd')
-
+
@@ -115,7 +115,7 @@
0 then '' else 'style="display:none"'#-->>
$show_notify_checkboxes('ncenter') -
+
@@ -141,7 +141,7 @@
0 then '' else 'style="display:none"'#-->>
$show_notify_checkboxes('acenter') -
+
@@ -167,7 +167,7 @@
0 then '' else 'style="display:none"'#-->>
$show_notify_checkboxes('ntfosd') -
+
@@ -207,7 +207,7 @@ $T('Optional') - $T('explain-nscript_parameters')
$show_notify_checkboxes('nscript') -
+
@@ -241,7 +241,7 @@ $T('explain-growl_password')
$show_notify_checkboxes('growl') -
+
@@ -286,7 +286,7 @@
-
+
@@ -352,7 +352,7 @@
-
+
@@ -389,7 +389,7 @@
$show_notify_checkboxes('pushbullet') -
+
@@ -417,6 +417,7 @@ \$(this).parents('.col2').find('.col2-cats').hide() } \$('form').submit() + addRowColor() }) \$('#email_endjob').change(function() { if(\$(this).val() > 0) { diff --git a/interfaces/Config/templates/config_server.tmpl b/interfaces/Config/templates/config_server.tmpl index e1e613d..cc77057 100644 --- a/interfaces/Config/templates/config_server.tmpl +++ b/interfaces/Config/templates/config_server.tmpl @@ -2,107 +2,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - -
-
- +
+ + + + +
+
+ +
+
-
-
- - - $T('srv-enable') -
-
- - -
-
- - -
-
- - - $T('explain-ssl') -
- -
- - -
-
- - -
-
- - -
-
- - $T('explain-svrprio') -
-
- - $T('days') -
-
- - $T('seconds') -
-
advanced-settings"> - - - $T('explain-ssl_verify').replace('. ', '.
')
-
-
- - - $T('srv-explain-send_group') -
-
- - - $T('explain-optional') -
-
- - -
-
- - -
-
- - - -
-
-
-
-
-
-
- +
+ +
+
+ + + $T('srv-enable') +
+
+ + +
+
+ + +
+
+ + + $T('explain-ssl') +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + $T('explain-svrprio') +
+
+ + $T('days') +
+
+ + $T('seconds') +
+
advanced-settings"> + + + $T('explain-ssl_verify').replace('. ', '.
')
+
+
+ + + $T('explain-ssl_ciphers')
$T('readwiki') + ${helpuri}advanced/ssl-ciphers
+
+
+ + + $T('srv-explain-send_group') +
+
+ + + $T('explain-optional') +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+ + + + + +
+ + + + +
"> +
"> +

$server['displayname']

+ + + + + + $server['priority'] + $T('srv-priority'): + + + + + + +
/>
+ + +
+ +
+ +
+ $T('srv-bandwidth'):
+ $T('total'): $(server['amounts'][0])B
+ $T('today'): $(server['amounts'][3])B
+ $T('thisWeek'): $(server['amounts'][2])B
+ $T('thisMonth'): $(server['amounts'][1])B
+ : +
+
+
+
+ + +
+
+
+ +
+ - - - - - - - - - - - - - - - - - - - - - -
- - - -
"> -
"> -

$server['displayname']

- - - - - - - $server['priority'] - $T('srv-priority'): - - - - -
/>
- - - -
- -
- -
- $T('srv-bandwidth'):
- $T('total'): $(server['amounts'][0])B
- $T('today'): $(server['amounts'][3])B
- $T('thisWeek'): $(server['amounts'][2])B
- $T('thisMonth'): $(server['amounts'][1])B -
-
- $show_date_selector($server, $cur) -
-
- - -
-
-
- - -
- -