Compare commits

...

5 Commits

Author SHA1 Message Date
Safihre
0542c25003 Update text files for 3.2.1
draft release
2021-03-31 09:24:31 +02:00
puzzledsab
1b8ee4e290 Show server expiration date in server summary (#1841) 2021-03-31 08:57:38 +02:00
Safihre
51128cba55 Do not notify warning/errors from same source twice
Closes #1842
2021-03-30 17:30:07 +02:00
Safihre
3612432581 Do not discard data for CrcError's
https://forums.sabnzbd.org/viewtopic.php?f=11&t=25278
2021-03-30 16:05:04 +02:00
Safihre
deca000a1b Revert some improvements to the encrypted RAR-detection
Closes #1840
2021-03-29 14:05:52 +02:00
6 changed files with 35 additions and 15 deletions

View File

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

View File

@@ -1,9 +1,6 @@
Release Notes - SABnzbd 3.2.1 Release Candidate 2
Release Notes - SABnzbd 3.2.1
=========================================================
## Changes and bugfixes since 3.2.1 RC 1
- Improvements to the encrypted RAR-detection.
## Changes and bugfixes since 3.2.0
- Single `Indexer Categories` in Categories were broken.
- Program would fail to start if Quota was previously exceeded.
@@ -11,11 +8,14 @@ Release Notes - SABnzbd 3.2.1 Release Candidate 2
- Show the name of the item to be deleted from the Queue/History
in the confirmation dialog.
- Handle directories in `.par2`-files during Quick-check.
- Do not discard data for articles with CRC-errors.
- Improvements to `Deobfuscate final filenames`:
Rename accompanying (smaller) files with the same basename.
Do not rename collections of the same extension.
- Sanitize names possibly derived from `X-DNZB-EpisodeName`.
- Widened the RSS feeds table.
- Show server expiration date in server summary.
- Improvements to the encrypted RAR-detection.
- Add traceback-logging when failing to read the password file.
- Windows: Use binary mode to make the write test more accurate.

View File

@@ -136,16 +136,29 @@ class GUIHandler(logging.Handler):
except TypeError:
parsed_msg = record.msg + str(record.args)
if record.levelno == logging.WARNING:
sabnzbd.notifier.send_notification(T("Warning"), parsed_msg, "warning")
else:
sabnzbd.notifier.send_notification(T("Error"), parsed_msg, "error")
warning = {
"type": record.levelname,
"text": parsed_msg,
"time": int(time.time()),
"origin": "%s%d" % (record.filename, record.lineno),
}
# Append traceback, if available
warning = {"type": record.levelname, "text": parsed_msg, "time": int(time.time())}
if record.exc_info:
warning["text"] = "%s\n%s" % (warning["text"], traceback.format_exc())
# Do not notify the same notification within 1 minute from the same source
# This prevents endless looping if the notification service itself throws an error/warning
# We don't check based on message content, because if it includes a timestamp it's not unique
if not any(
stored_warning["origin"] == warning["origin"] and stored_warning["time"] + DEF_TIMEOUT > time.time()
for stored_warning in self.store
):
if record.levelno == logging.WARNING:
sabnzbd.notifier.send_notification(T("Warning"), parsed_msg, "warning")
else:
sabnzbd.notifier.send_notification(T("Error"), parsed_msg, "error")
# Loose the oldest record
if len(self.store) >= self._size:
self.store.pop(0)

View File

@@ -273,6 +273,9 @@
<b>$T('srv-article-availability'):</b><br/>
$T('selectedDates'): <span id="server-article-value-${cur}"></span>
</p>
<!--#if $server['expire_date']#-->
<p><b>$T('srv-expire_date'):</b> $(server['expire_date'])</p>
<!--#end if#-->
<!--#if $server['quota']#-->
<p><b>$T('quota-left'):</b> $(server['quota_left'])B</p>
<!--#end if#-->

View File

@@ -344,8 +344,9 @@ def check_encrypted_and_unwanted_files(nzo: NzbObject, filepath: str) -> Tuple[b
# This one really didn't work
pass
except rarfile.RarCRCError as e:
# CRC errors can be thrown for wrong password and actual CRC errors
if "wrong password" not in str(e).lower():
# CRC errors can be thrown for wrong password or
# missing the next volume (with correct password)
if "cannot find volume" in str(e).lower():
# We assume this one worked!
password_hit = password
break

View File

@@ -46,7 +46,7 @@ except ImportError:
class CrcError(Exception):
def __init__(self, needcrc, gotcrc, data):
def __init__(self, needcrc: int, gotcrc: int, data: bytes):
super().__init__()
self.needcrc = needcrc
self.gotcrc = gotcrc
@@ -154,13 +154,16 @@ class DecoderWorker(Thread):
sabnzbd.NzbQueue.reset_try_lists(article)
continue
except CrcError:
except CrcError as crc_error:
logging.info("CRC Error in %s" % art_id)
# Continue to the next one if we found new server
if search_new_server(article):
continue
# Store data, maybe par2 can still fix it
decoded_data = crc_error.data
except (BadYenc, ValueError):
# Handles precheck and badly formed articles
if nzo.precheck and raw_data and raw_data[0].startswith(b"223 "):