Compare commits

...

21 Commits

Author SHA1 Message Date
Safihre
48e034f4be Update text files for 2.3.9RC1 2019-05-07 13:50:20 +02:00
Safihre
f8959baa2f Revert "Notify develop-users that we will switch to Python 3"
This reverts commit fb238af7de.
2019-05-07 13:35:13 +02:00
Safihre
8ed5997eae Merge branch 'develop' into 2.3.x 2019-05-07 13:10:10 +02:00
Safihre
129d3eaf07 Handle "Unexpected end of archive" from UnRar
Closes #1282
2019-05-07 11:01:16 +02:00
Safihre
350db4afc0 Unpacking could hang forever on unicode downloads 2019-05-07 09:47:58 +02:00
Safihre
0a8ffd233e Use Python 2.7 for TravisCI tests 2019-05-07 09:29:34 +02:00
Safihre
a74b500e96 Update MultiPar to v1.3.0.5 and UnRar to 5.71 2019-05-07 09:21:48 +02:00
Safihre
1298e7ccce Non existing categories should result in Default being returned 2019-05-07 09:12:14 +02:00
Safihre
e1c61c41ca Display of Bytes/second speeds was incorrect
Not really relevant, but still
2019-05-07 09:11:25 +02:00
Safihre
3da76e15d2 Pause longer before registering single click
Closes #1210
2019-05-07 09:02:25 +02:00
Safihre
b116c24b84 Only log pre-check once 2019-05-07 09:01:07 +02:00
Safihre
a43810ec46 Rename Server Load-balancing
See #1249
2019-05-07 09:00:52 +02:00
Safihre
d4954b52ec Remove over-active unrar-stop detection
Too many false-positives.
2019-05-07 08:58:53 +02:00
Safihre
b0332e141c Remove error.log if it is too big 2019-04-21 10:52:40 +02:00
Safihre
80a181816e Only delete completed jobs from history when using max number of jobs
See https://forums.sabnzbd.org/viewtopic.php?f=3&t=24144&p=118606#p118605
2019-04-20 21:43:10 +02:00
Safihre
0dec3b7ec3 Remove bad print statement of par2 files
Closes #1269
2019-04-19 09:00:04 +02:00
Safihre
2c92a7621c Test Download could fail if clicked on icon instead of button
Closes #1263
2019-04-02 08:26:53 +02:00
Safihre
e05beb71e6 Only get series info when adding to the database 2019-03-20 14:29:06 +01:00
Safihre
6d82c7e542 Series Duplicate detection did not work as result of Direct Unpack
The Post-Processing time would be 0 seconds, so it would never store duplicate-check information. Oops.
2019-03-20 12:57:44 +01:00
Safihre
fb238af7de Notify develop-users that we will switch to Python 3 2019-03-18 18:45:05 +01:00
Safihre
6b9e3cd9d8 Merge branch '2.3.x' into develop 2019-03-18 18:44:09 +01:00
23 changed files with 80 additions and 76 deletions

View File

@@ -3,6 +3,7 @@ matrix:
include:
- os: linux
language: python
python: 2.7
env:
- secure: iMXx74c2eUhDPJrukvAFxCFNWYDk8JB2alQ89Hc3T1ckXfDS37vgUplTze1aGo+AefUkDSFmTreFk9hVJvd4SQTHz4wS+qp7HQJFWECjR16jZwobIbukNPNU1JamozZoOa2igoVIJ8/tVIdIpfcsGfzj9WogwUlpChWHIiI8SM/Fc0WK+M9rDPKBpgjEN2yom73jbC2ETxuQ/HMdMNnNS9S1vS7MY+2W69+xi5Kl9hP0HUBIG/JtVXu1a4SO5NgqL5aW4cgKtgg0IjpedBRMcC0rpyEz+lDtl2jXYR+mXQEO8uNZOwzV7SLrq/ROGwW+DMtfiiySKxmuYoL/JOm4kcLyEup51dgnTQc1RdEcaYfk0twDry67prnQ/sXAQphzjl0StrTpLfzWUsCvgXRp7+XWhX9ElHN4KelOcAc7YeTSXoPY6bENk8LSy1woJ2HbH5TkSvtVJ6xrmssV3bEMp7aGx7qv1D/uvyAEMulB79WwdLyoDxmG9eIgXfp3nICko4p9kisrzK0hVCGDRCHSYgTnDBGTMJU/SlRRNUepmXHXQUrqWyTWvy2HTMUTjuYBaaNcUqZvyHyyaDq0MNBotwDCmes5o8fZu456lB/B26LwUu7cOSbCw19ePlGBNnbjA9NmNoQGOo66era3NEVJLYv+H91PAPQyWpzOt0X53Gk=
- secure: Cryq31K8wxt+q212/q7IHlLf4flH4riaiHssxR0/VfGACtMp3jOAVZ5RAOvX03LPYp+BuX2KAHFXDHeGHGzYmESkpzPCToZ3GpaOwP3ymc3RNeU6bd98yEQyQtM/wtY4uxPUWdwz5Uw5kkeynxw3y/QFsYceipB3u3oCvfB9n8SqWShjWpBFyFhSKS/SJjUqgNcAaA0pTP8l/crquZNhkug/J8Nlc/nC0H6ZSJKGu8UhkhZ0VSEY8dofZZkGG6YCIIEAqGasQqkra6x/D0uECfQnnDrTqekvklUG31/zy+awQXl+0NjLTIKyl2rHp5AUpSTlbPO2mDYdbWEWcRYmNsEEiGfvy3R9kGGbNijB5b57jvgsJapH8DkGRWseISdCBWqLH7C/OafNuMGzQ4s3UCN1aazqqN/IAJplVjSWiKA76Nbh385x88E8RaH7Gnvx1ZK88Lgf7Bz8Ar/O1dMviyP8WbM/vQQkVMdOk89y5O6G8ZwHFoj/v8w383irWMN2iU0Mf7GKW91ughpKrrKbXCmkT1bR9+tNYpKWU1O+1jgnGk65149GNC0K+9exWt0TK3pNSUa7b2nVzxeAqdCJjCoKBi2pLiRxYVI50V80M2p5Xw+5iiSiOhTLzFLT3YRi2VBjjBFa8BHJHBS9Pua4DaFc1w06XNej6K8rRV5We0s=

View File

@@ -1,5 +1,5 @@
*******************************************
*** This is SABnzbd 2.3.8 ***
*** This is SABnzbd 2.3.9 ***
*******************************************
SABnzbd is an open-source cross-platform binary newsreader.
It simplifies the process of downloading from Usenet dramatically,

View File

@@ -1,4 +1,4 @@
SABnzbd 2.3.8
SABnzbd 2.3.9
-------------------------------------------------------------------------------
0) LICENSE

View File

@@ -1,7 +1,7 @@
Metadata-Version: 1.0
Name: SABnzbd
Version: 2.3.8
Summary: SABnzbd-2.3.8
Version: 2.3.9RC1
Summary: SABnzbd-2.3.9RC1
Home-page: https://sabnzbd.org
Author: The SABnzbd Team
Author-email: team@sabnzbd.org

View File

@@ -1,16 +1,18 @@
Release Notes - SABnzbd 2.3.8
Release Notes - SABnzbd 2.3.9 RC 1
=========================================================
## Improvements and bug fixes since 2.3.7
- Changes to newsserver configuration could be delayed
- Filenames would not be sanitized when using "Make Windows compatible"
- Sorting could fail on root-folders
- 7z-files were not listed as supported NZB archives
- SSL cipher settings were ignored during server test
- Windows: update 7zip to 19.00
- Windows: update MultiPar to v1.3.0.4
- Windows and macOS: update Python to 2.7.16
- Windows and macOS: update UnRar to 5.70
## Improvements and bug fixes since 2.3.8
- Warning "Unable to stop the unrar process" was shown too often
- Direct Unpack could hang forever on unicode downloads
- Test Download could fail if clicked on icon instead of button
- Series Duplicate detection did not always work with Direct Unpack enabled
- Adding job with non-existing category was not set to Default (*) category
- Only delete completed jobs from history when using History Retention option
- Renamed Server Load-balancing to Server IP address selection
- Linux: remove sabnzbd.error.log file at start-up if it grew too large
- Windows: double-click delay increased to avoid accidental pausing
- Windows: update MultiPar to v1.3.0.5
- Windows and macOS: update UnRar to 5.71
## Upgrading from 2.2.x and older
- Finish queue

View File

@@ -89,7 +89,7 @@ import sabnzbd.newsunpack
from sabnzbd.misc import real_path, \
check_latest_version, exit_sab, get_from_url, \
split_host, get_ext, create_https_certificates, \
windows_variant, ip_extract, set_serv_parms, get_serv_parms, globber_full
windows_variant, ip_extract, set_serv_parms, get_serv_parms, globber_full, remove_file
from sabnzbd.panic import panic_tmpl, panic_port, panic_host, \
panic_sqlite, panic, launch_a_browser
import sabnzbd.scheduler as scheduler
@@ -1126,8 +1126,14 @@ def main():
try:
x = sys.stderr.fileno
x = sys.stdout.fileno
ol_path = os.path.join(logdir, DEF_LOG_ERRFILE)
out_log = file(ol_path, 'a+', 0)
# Get log file path and remove the log file if it got too large
log_path = os.path.join(logdir, DEF_LOG_ERRFILE)
if os.path.exists(log_path) and os.path.getsize(log_path) > sabnzbd.cfg.log_size.get_int():
remove_file(log_path)
# Redirect stderr/stdout
out_log = file(log_path, 'a+', 0)
sys.stderr.flush()
sys.stdout.flush()
os.dup2(out_log.fileno(), sys.stderr.fileno())

View File

@@ -35,6 +35,6 @@
<!--#else if float($mbleft) < 0.1#-->
SABnzbd
<!--#else#-->
<!--#if float($kbpersec) > 1023 #-->$speed<!--#else#--><!--#echo "%.0f" % float($kbpersec)#--> K<!--#end if#-->B/s - $sizeleft $T('Glitter-left') - SABnzbd
${speed}B/s - $sizeleft $T('Glitter-left') - SABnzbd
<!--#end if#-->
|||<!--#echo "%.0f" % float($kbpersec)#-->

View File

@@ -96,7 +96,7 @@ function ViewModel() {
// Dynamic speed text function
self.speedText = ko.pureComputed(function() {
return self.speed() + ' ' + (self.speedMetrics[self.speedMetric()] ? self.speedMetrics[self.speedMetric()] : "KB/s");
return self.speed() + ' ' + (self.speedMetrics[self.speedMetric()] ? self.speedMetrics[self.speedMetric()] : "B/s");
});
// Dynamic icon
@@ -852,6 +852,12 @@ function ViewModel() {
// Download a test-NZB
self.testDownload = function(data, event) {
var nzbSize = $(event.target).data('size')
// Maybe it was a click on the icon?
if(nzbSize == undefined) {
nzbSize = $(event.target.parentElement).data('size')
}
// Build request
var theCall = {
mode: "addurl",

View File

Binary file not shown.

View File

@@ -5,14 +5,14 @@
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-2.4.0-develop\n"
"Project-Id-Version: SABnzbd-2.3.8\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: shypike@sabnzbd.org\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ASCII\n"
"Content-Transfer-Encoding: 7bit\n"
"POT-Creation-Date: 2019-01-04 12:49+W. Europe Standard Time\n"
"POT-Creation-Date: 2019-05-07 09:00+W. Europe Daylight Time\n"
"Generated-By: pygettext.py 1.5\n"
@@ -412,10 +412,6 @@ msgstr ""
msgid "Unpacked %s files/folders in %s"
msgstr ""
#: sabnzbd/directunpacker.py [Warning message]
msgid "Unable to stop the unrar process."
msgstr ""
#: sabnzbd/directunpacker.py [Warning message]
msgid "Direct Unpack was automatically enabled."
msgstr ""
@@ -3275,19 +3271,19 @@ msgid "Comma separated list"
msgstr ""
#: sabnzbd/skintext.py
msgid "Server load-balancing"
msgid "Server IP address selection"
msgstr ""
#: sabnzbd/skintext.py
msgid "Prevent load-balancing"
msgid "First IP address"
msgstr ""
#: sabnzbd/skintext.py
msgid "Allow load-balancing"
msgid "Randomly selected IP address"
msgstr ""
#: sabnzbd/skintext.py
msgid "Allow load-balancing with optimization for IPv6"
msgid "Quickest IP address, preferring IPv6"
msgstr ""
#: sabnzbd/skintext.py
@@ -4154,10 +4150,6 @@ msgstr ""
msgid "Optionally specify a filename"
msgstr ""
#: sabnzbd/skintext.py
msgid "Formats: .nzb, .rar, .zip, .gz, .bz2"
msgstr ""
#: sabnzbd/skintext.py
msgid "Submit"
msgstr ""

View File

@@ -36,7 +36,7 @@ import threading
import sabnzbd
import sabnzbd.cfg
from sabnzbd.constants import DB_HISTORY_NAME, STAGES
from sabnzbd.constants import DB_HISTORY_NAME, STAGES, Status
from sabnzbd.encoding import unicoder
from sabnzbd.bpsmeter import this_week, this_month
from sabnzbd.decorators import synchronized
@@ -259,11 +259,11 @@ class HistoryDB(object):
to_keep = int_conv(sabnzbd.cfg.history_retention())
if to_keep > 0:
logging.info('Removing all but last %s completed jobs from history', to_keep)
return self.execute("""DELETE FROM history WHERE id NOT IN ( SELECT id FROM history WHERE status = 'Completed' ORDER BY completed DESC LIMIT ? )""", (to_keep,), save=True)
return self.execute("""DELETE FROM history WHERE status = ? AND id NOT IN ( SELECT id FROM history WHERE status = ? ORDER BY completed DESC LIMIT ? )""", (Status.COMPLETED, Status.COMPLETED, to_keep), save=True)
def add_history_db(self, nzo, storage, path, postproc_time, script_output, script_line):
""" Add a new job entry to the database """
t = build_history_info(nzo, storage, path, postproc_time, script_output, script_line)
t = build_history_info(nzo, storage, path, postproc_time, script_output, script_line, series_info=True)
self.execute("""INSERT INTO history (completed, name, nzb_name, category, pp, script, report,
url, status, nzo_id, storage, path, script_log, script_line, download_time, postproc_time, stage_log,
@@ -438,7 +438,7 @@ def dict_factory(cursor, row):
_PP_LOOKUP = {0: '', 1: 'R', 2: 'U', 3: 'D'}
def build_history_info(nzo, storage='', downpath='', postproc_time=0, script_output='', script_line=''):
def build_history_info(nzo, storage='', downpath='', postproc_time=0, script_output='', script_line='', series_info=False):
""" Collects all the information needed for the database """
if not downpath:
@@ -491,7 +491,7 @@ def build_history_info(nzo, storage='', downpath='', postproc_time=0, script_out
# Analyze series info only when job is finished
series = u''
if postproc_time:
if series_info:
seriesname, season, episode, dummy = sabnzbd.newsunpack.analyse_show(nzo.final_name)
if seriesname and season and episode:
series = u'%s/%s/%s' % (seriesname.lower(), season, episode)

View File

@@ -175,7 +175,8 @@ class Decoder(Thread):
if nzo.precheck:
if found and not killed:
# Pre-check, proper article found, just register
logging.debug('Server %s has article %s', article.fetcher, art_id)
if sabnzbd.LOG_ALL:
logging.debug('Server %s has article %s', article.fetcher, art_id)
register = True
elif not killed and not found:
logme = T('Badly formed yEnc article in %s') % art_id

View File

@@ -51,7 +51,6 @@ from subprocess import Popen
# Otherwise we could stop while the thread was still starting
START_STOP_LOCK = threading.RLock()
MAX_ACTIVE_UNPACKERS = 10
ACTIVE_UNPACKERS = []
RAR_NR = re.compile(r'(.*?)(\.part(\d*).rar|\.r(\d*))$', re.IGNORECASE)
@@ -77,6 +76,8 @@ class DirectUnpacker(threading.Thread):
self.success_sets = {}
self.next_sets = []
self.duplicate_lines = 0
nzo.direct_unpacker = self
def stop(self):
@@ -176,10 +177,10 @@ class DirectUnpacker(threading.Thread):
break
# Error? Let PP-handle it
if linebuf.endswith(('ERROR: ', 'Cannot create', 'in the encrypted file', 'CRC failed',
'checksum failed', 'You need to start extraction from a previous volume',
'password is incorrect', 'Write error', 'checksum error',
'start extraction from a previous volume')):
if linebuf.endswith(('ERROR: ', 'Cannot create', 'in the encrypted file', 'CRC failed', 'checksum failed',
'You need to start extraction from a previous volume', 'password is incorrect',
'Write error', 'checksum error', 'start extraction from a previous volume'
'Unexpected end of archive')):
logging.info('Error in DirectUnpack of %s: %s', self.cur_setname, linebuf.strip())
self.abort()
@@ -271,13 +272,16 @@ class DirectUnpacker(threading.Thread):
logging.info('DirectUnpacked volume %s for %s', self.cur_volume, self.cur_setname)
# If lines did not change and we don't have the next volume, this download is missing files!
# In rare occasions we can get stuck forever with repeating lines
if last_volume_linebuf == linebuf:
if not self.have_next_volume():
if not self.have_next_volume() or self.duplicate_lines > 10:
logging.info('DirectUnpack failed due to missing files %s', self.cur_setname)
self.abort()
else:
logging.debug('Duplicate output line detected: "%s"', last_volume_linebuf)
self.duplicate_lines += 1
else:
self.duplicate_lines = 0
last_volume_linebuf = linebuf
# Show the log
@@ -398,20 +402,12 @@ class DirectUnpacker(threading.Thread):
pass
# Now force kill and give it a bit of time
self.active_instance.kill()
time.sleep(0.2)
# Have to collect the return-code to avoid zombie
# But it will block forever if the process is in special state.
# That should never happen, but it can happen on broken unrar's
if self.active_instance.poll():
self.active_instance.communicate()
else:
# It is still running?!? This should never happen
# Wait a little bit longer just to be sure..
time.sleep(2.0)
if not self.active_instance.poll():
logging.warning(T('Unable to stop the unrar process.'))
try:
self.active_instance.kill()
time.sleep(0.2)
except AttributeError:
# Already killed by the Quit command
pass
# Wake up the thread
with self.next_file_lock:

View File

@@ -158,6 +158,7 @@ def cat_to_opts(cat, pp=None, script=None, priority=None):
try:
my_cat = config.get_categories()[cat]
except KeyError:
cat = '*'
my_cat = def_cat
if pp is None:

View File

@@ -33,7 +33,7 @@ from sabnzbd.encoding import TRANS, unicoder, platform_encode, deunicode
import sabnzbd.utils.rarfile as rarfile
from sabnzbd.misc import format_time_string, find_on_path, make_script_path, int_conv, \
real_path, globber, globber_full, get_all_passwords, renamer, clip_path, calc_age, \
long_path, remove_file, recursive_listdir, is_rarfile
long_path, remove_file, recursive_listdir, is_rarfile, get_filename
from sabnzbd.sorting import SeriesSorter
import sabnzbd.cfg as cfg
from sabnzbd.constants import Status
@@ -759,7 +759,7 @@ def rar_extract_core(rarfile_path, numrars, one_folder, nzo, setname, extraction
# unrar 3.x: "Encrypted file: CRC failed in oLKQfrcNVivzdzSG22a2xo7t001.part1.rar (password incorrect ?)"
# unrar 4.x: "CRC failed in the encrypted file oLKQfrcNVivzdzSG22a2xo7t001.part1.rar. Corrupt file or wrong password."
# unrar 5.x: "Checksum error in the encrypted file oLKQfrcNVivzdzSG22a2xo7t001.part1.rar. Corrupt file or wrong password."
# unrar 5.01 : "The specified password is incorrect."
# unrar 5.01: "The specified password is incorrect."
m = re.search(r'encrypted file (.+)\. Corrupt file', line)
if not m:
# unrar 3.x syntax
@@ -767,7 +767,7 @@ def rar_extract_core(rarfile_path, numrars, one_folder, nzo, setname, extraction
if m:
filename = TRANS(m.group(1)).strip()
else:
filename = os.path.split(rarfile_path)[1]
filename = get_filename(rarfile_path)
nzo.fail_msg = T('Unpacking failed, archive requires a password')
msg = (u'[%s][%s] ' + T('Unpacking failed, archive requires a password')) % (setname, filename)
nzo.set_unpack_info('Unpack', unicoder(msg))
@@ -779,20 +779,20 @@ def rar_extract_core(rarfile_path, numrars, one_folder, nzo, setname, extraction
if m:
filename = TRANS(m.group(1)).strip()
else:
filename = '???'
filename = get_filename(rarfile_path)
nzo.fail_msg = T('Unusable RAR file')
msg = ('[%s][%s] ' + T('Unusable RAR file')) % (setname, filename)
nzo.set_unpack_info('Unpack', unicoder(msg))
fail = 3
elif 'checksum error' in line:
# Corrupt archive
elif 'checksum error' in line or 'Unexpected end of archive' in line:
# Corrupt archive or passworded, we can't know
# packed data checksum error in volume FILE
m = re.search(r'error in volume (.+)', line)
if m:
filename = TRANS(m.group(1)).strip()
else:
filename = '???'
filename = get_filename(rarfile_path)
nzo.fail_msg = T('Corrupt RAR file')
msg = ('[%s][%s] ' + T('Corrupt RAR file')) % (setname, filename)
nzo.set_unpack_info('Unpack', unicoder(msg))

View File

@@ -131,7 +131,6 @@ def parse_par2_file_packet(f, header):
nothing = None, None, None
if header != PAR_PKT_ID:
print header
return nothing
# Length must be multiple of 4 and at least 20

View File

@@ -542,10 +542,10 @@ SKIN_TEXT = {
'opt-rating_filter_downvoted' : TT('More thumbs down than up'),
'opt-rating_filter_keywords' : TT('Title keywords'),
'explain-rating_filter_keywords' : TT('Comma separated list'),
'opt-load_balancing' : TT('Server load-balancing'),
'no-load-balancing' : TT('Prevent load-balancing'),
'load-balancing' : TT('Allow load-balancing'),
'load-balancing-happy-eyeballs' : TT('Allow load-balancing with optimization for IPv6'),
'opt-load_balancing' : TT('Server IP address selection'),
'no-load-balancing' : TT('First IP address'),
'load-balancing' : TT('Randomly selected IP address'),
'load-balancing-happy-eyeballs' : TT('Quickest IP address, preferring IPv6'),
'explain-load_balancing' : TT('Useful if a newsserver has more than one IPv4/IPv6 address'),
# Config->Server

View File

@@ -190,7 +190,7 @@ class SysTrayIconThread(Thread):
# Wrapper of win32api, timeout is in ms
# We need to wait at least untill what user has defined as double click
self.stop_click_timer()
self.click_timer = timer.set_timer(win32gui.GetDoubleClickTime(), self.click)
self.click_timer = timer.set_timer(win32gui.GetDoubleClickTime() * 2, self.click)
return True
def show_menu(self):

View File

@@ -4,5 +4,5 @@
# You MUST use double quotes (so " and not ')
__version__ = "2.3.8"
__baseline__ = "83ccc0a765e8b3e1350d89fe4a02b95e17fd059e"
__version__ = "2.3.9"
__baseline__ = "unknown"

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.