Compare commits

..

8 Commits

Author SHA1 Message Date
Safihre
8734a4f24b Update text files for 4.2.3RC1 2024-02-19 22:19:43 +01:00
Shane Mc Cormack
480fce55a8 Handle NNTP error code 451 (#2808)
* Handle error code 451.

This is used by some servers to show that an article was intentionally removed.
Fix #2807

* Add a warning when an unknown status code is given for an article.

* Make warning message translatable.
2024-02-19 22:06:29 +01:00
thezoggy
d4136fadd2 Add missing tooltips (#2800)
Co-authored-by: Safihre <safihre@sabnzbd.org>
2024-02-18 13:42:48 +01:00
Safihre
308bc375bd Update log message about version check 2024-02-18 13:42:31 +01:00
Safihre
3bbcf6a41e Update standby command on macOS 2024-02-18 13:41:33 +01:00
Safihre
3d5d10a4c1 Remove parsing of Group command code
Since we never request it.
2024-02-18 13:41:05 +01:00
Safihre
0e979c14f0 Remove Send Group option
Closes #2715
2024-02-18 13:38:31 +01:00
Safihre
70f49114ac Wrong archive password is used for Retry
Closes #2790
2024-02-18 13:38:13 +01:00
15 changed files with 40 additions and 63 deletions

View File

@@ -1,7 +1,17 @@
Release Notes - SABnzbd 4.2.2
Release Notes - SABnzbd 4.2.3 Release Candidate 1
=========================================================
This is the second bug-fix release of SABnzbd 4.2.0.
This is the third bug-fix release of SABnzbd 4.2.0.
## Bug-fixes and changes since 4.2.2:
* **Bug-fixes:**
* Handle new status code for missing articles, which could result in timeouts.
* Retry of failed job would not use the password provided.
* macOS: System standby after finishing the queue would not always work.
* **Changes:**
* Remove `Send Group` option for Servers.
## Bug-fixes and changes since 4.2.1:

View File

@@ -106,11 +106,6 @@
<span class="desc">$T('explain-ssl_ciphers') <br>$T('readwiki')
<a href="https://sabnzbd.org/wiki/advanced/ssl-ciphers" target="_blank">https://sabnzbd.org/wiki/advanced/ssl-ciphers</a></span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="send_group">$T('srv-send_group')</label>
<input type="checkbox" name="send_group" id="send_group" value="1" />
<span class="desc">$T('srv-explain-send_group')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="required">$T('srv-required')</label>
<input type="checkbox" name="required" id="required" value="1" />
@@ -248,11 +243,6 @@
<input type="checkbox" name="optional" id="optional$cur" value="1" <!--#if int($server['optional']) != 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-optional')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="send_group$cur">$T('srv-send_group')</label>
<input type="checkbox" name="send_group" id="send_group$cur" value="1" <!--#if int($server['send_group']) != 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('srv-explain-send_group')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="expire_date$cur">$T('srv-expire_date')</label>
<input type="date" name="expire_date" id="expire_date$cur" value="$server['expire_date']" />

View File

@@ -140,7 +140,7 @@
</label>
</div>
<a href="#" class="hover-button" data-bind="visible: history.isMultiEditing(), click: history.doMultiDelete">
<a href="#" class="hover-button" title="$T('nzo-delete')" data-bind="visible: history.isMultiEditing(), click: history.doMultiDelete">
<span class="glyphicon glyphicon-trash"></span>
</a>
<a href="#modal-purge-history" class="hover-button" title="$T('purgeHist')" data-bind="visible: !history.isMultiEditing()" data-toggle="modal" data-tooltip="true" data-placement="left">

View File

@@ -174,7 +174,7 @@
<label for="multiedit-checkall-queue">
<input type="checkbox" name="multieditCheckAll" id="multiedit-checkall-queue" title="$T('Glitter-checkAll')" data-bind="click: queue.checkAllJobs" data-tooltip="true" data-placement="top" />
</label>
<a href="#" class="hover-button" data-bind="click: queue.doMultiDelete">
<a href="#" class="hover-button" title="$T('removeNZB-Files')" data-bind="click: queue.doMultiDelete">
<span class="glyphicon glyphicon-trash"></span>
</a>
</div>

View File

@@ -447,7 +447,6 @@ class ConfigServer:
self.expire_date = OptionStr(name, "expire_date", add=False)
self.quota = OptionStr(name, "quota", add=False)
self.usage_at_start = OptionNumber(name, "usage_at_start", add=False)
self.send_group = OptionBool(name, "send_group", False, add=False)
self.priority = OptionNumber(name, "priority", 0, 0, 99, add=False)
self.notes = OptionStr(name, "notes", add=False)
@@ -473,7 +472,6 @@ class ConfigServer:
"ssl",
"ssl_verify",
"ssl_ciphers",
"send_group",
"enable",
"required",
"optional",
@@ -516,7 +514,6 @@ class ConfigServer:
output_dict["expire_date"] = self.expire_date()
output_dict["quota"] = self.quota()
output_dict["usage_at_start"] = self.usage_at_start()
output_dict["send_group"] = self.send_group()
output_dict["priority"] = self.priority()
output_dict["notes"] = self.notes()
return output_dict

0
sabnzbd/deobfuscate_filenames.py Executable file → Normal file
View File

View File

@@ -80,7 +80,6 @@ class Server:
"required",
"optional",
"retention",
"send_group",
"username",
"password",
"busy_threads",
@@ -111,7 +110,6 @@ class Server:
use_ssl,
ssl_verify,
ssl_ciphers,
send_group,
username=None,
password=None,
required=False,
@@ -134,15 +132,6 @@ class Server:
self.required: bool = required
self.optional: bool = optional
self.retention: int = retention
self.send_group: bool = send_group
# TODO: Remove after next release
if send_group:
helpful_warning(
"You have 'Send Group' enabled for %s. Could you let us know why? https://github.com/sabnzbd/sabnzbd/discussions/2715",
self.displayname,
)
self.username: Optional[str] = username
self.password: Optional[str] = password
@@ -331,7 +320,6 @@ class Downloader(Thread):
required = srv.required()
optional = srv.optional()
retention = int(srv.retention() * 24 * 3600) # days ==> seconds
send_group = srv.send_group()
create = True
if oldserver:
@@ -358,7 +346,6 @@ class Downloader(Thread):
ssl,
ssl_verify,
ssl_ciphers,
send_group,
username,
password,
required,
@@ -754,13 +741,7 @@ class Downloader(Thread):
done = True
logging.debug("Article <%s> is present", article.article)
elif nw.status_code == 211:
logging.debug("group command ok -> %s", nw.nntp_msg)
nw.group = nw.article.nzf.nzo.group
nw.reset_data_buffer()
self.__request_article(nw)
elif nw.status_code in (411, 423, 430):
elif nw.status_code in (411, 423, 430, 451):
done = True
logging.debug(
"Thread %s@%s: Article %s missing (error=%s)",
@@ -783,6 +764,18 @@ class Downloader(Thread):
nw.reset_data_buffer()
self.__request_article(nw)
else:
logging.warning(
T("%s@%s recieved unknown status code %s for article %s: %s"),
nw.thrdnum,
nw.server.host,
nw.status_code,
article.article,
nw.nntp_msg.splitlines()[0],
)
done = True
nw.reset_data_buffer()
if done:
# Successful data, clear "bad" counter
server.bad_cons = 0
@@ -975,16 +968,9 @@ class Downloader(Thread):
def __request_article(self, nw: NewsWrapper):
try:
nzo = nw.article.nzf.nzo
if nw.server.send_group and nzo.group != nw.group:
group = nzo.group
if sabnzbd.LOG_ALL:
logging.debug("Thread %s@%s: GROUP <%s>", nw.thrdnum, nw.server.host, group)
nw.send_group(group)
else:
if sabnzbd.LOG_ALL:
logging.debug("Thread %s@%s: BODY %s", nw.thrdnum, nw.server.host, nw.article.article)
nw.body()
if sabnzbd.LOG_ALL:
logging.debug("Thread %s@%s: BODY %s", nw.thrdnum, nw.server.host, nw.article.article)
nw.body()
# Mark as ready to be read
self.add_socket(nw.nntp.fileno, nw)
except socket.error as err:

View File

@@ -1162,7 +1162,7 @@ def handle_server(kwargs, root=None, new_svr=False):
if new_svr:
server = unique_svr_name(server)
for kw in ("ssl", "send_group", "enable", "required", "optional"):
for kw in ("ssl", "enable", "required", "optional"):
if kw not in kwargs.keys():
kwargs[kw] = None
if svr and not new_svr:

View File

@@ -482,7 +482,7 @@ def check_latest_version():
# Fetch version info
data = get_from_url("https://sabnzbd.org/latest.txt")
if not data:
logging.info("Cannot retrieve version information from GitHub.com")
logging.info("Cannot retrieve version information from sabnzbd.org")
logging.debug("Traceback: ", exc_info=True)
return

View File

@@ -177,13 +177,6 @@ class NewsWrapper:
self.nntp.sock.sendall(command)
self.reset_data_buffer()
def send_group(self, group: str):
"""Send the NNTP GROUP command"""
self.timeout = time.time() + self.server.timeout
command = utob("GROUP %s\r\n" % group)
self.nntp.sock.sendall(command)
self.reset_data_buffer()
def recv_chunk(self) -> Tuple[int, bool]:
"""Receive data, return #bytes, done, skip"""
# Resize the buffer in the extremely unlikely case that it got full

View File

@@ -1884,11 +1884,15 @@ class NzbObject(TryList):
return None, None, None
# Only a subset we want to apply directly to the NZO
for attrib in ("final_name", "priority", "password", "url"):
for attrib in ("final_name", "priority", "url"):
# Only set if it is present and has a value
if attribs.get(attrib):
setattr(self, attrib, attribs[attrib])
# Only set password if it wasn't already set
if not self.password and attribs.get("password"):
self.password = attribs["password"]
# Rest is to be used directly in the NZO-init flow
return attribs["cat"], attribs["pp"], attribs["script"]

View File

@@ -92,7 +92,7 @@ def osx_shutdown():
def osx_standby():
"""Make macOS system sleep, returns after wakeup"""
try:
subprocess.call(["osascript", "-e", 'tell app "System Events" to sleep'])
subprocess.call(["pmset", "sleepnow"])
time.sleep(10)
except:
logging.error(T("Failed to standby system"))

View File

@@ -567,8 +567,6 @@ SKIN_TEXT = {
"button-clrServer": TT("Clear Counters"), #: Button: Clear server's byte counters
"srv-testing": TT("Testing server details..."),
"srv-bandwidth": TT("Bandwidth"),
"srv-send_group": TT("Send Group"),
"srv-explain-send_group": TT("Send group command before requesting articles."),
"srv-notes": TT("Personal notes"),
"srv-article-availability": TT("Article availability"),
"srv-articles-tried": TT(

View File

@@ -78,7 +78,6 @@ def test_nntp_server_dict(kwargs):
use_ssl=ssl,
ssl_verify=ssl_verify,
ssl_ciphers=ssl_ciphers,
send_group=False,
username=username,
password=password,
)

View File

@@ -6,5 +6,5 @@
# You MUST use double quotes (so " and not ')
# Do not forget to update the appdata file for every major release!
__version__ = "4.2.2"
__baseline__ = "0172ee25c91364744f3b9858fe9307913cd19897"
__version__ = "4.2.3RC1"
__baseline__ = "unknown"