mirror of
https://github.com/sabnzbd/sabnzbd.git
synced 2026-01-04 05:29:28 -05:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
971e4fc909 | ||
|
|
51cc765949 | ||
|
|
19c6a4fffa | ||
|
|
105ac32d2f | ||
|
|
57550675d2 | ||
|
|
e674abc5c0 | ||
|
|
f965c96f51 | ||
|
|
c76b8ed9e0 | ||
|
|
4fbd0d8a7b | ||
|
|
41ca217931 | ||
|
|
0087940898 | ||
|
|
8f21533e76 | ||
|
|
89996482a1 | ||
|
|
03c10dce91 | ||
|
|
bd5331be05 | ||
|
|
46e1645289 | ||
|
|
4ce3965747 | ||
|
|
9d4af19db3 | ||
|
|
48e034f4be | ||
|
|
f8959baa2f | ||
|
|
8ed5997eae | ||
|
|
daf9f50ac8 | ||
|
|
6b11013c1a |
4
PKG-INFO
4
PKG-INFO
@@ -1,7 +1,7 @@
|
||||
Metadata-Version: 1.0
|
||||
Name: SABnzbd
|
||||
Version: 3.0.2RC1
|
||||
Summary: SABnzbd-3.0.2RC1
|
||||
Version: 3.0.2
|
||||
Summary: SABnzbd-3.0.2
|
||||
Home-page: https://sabnzbd.org
|
||||
Author: The SABnzbd Team
|
||||
Author-email: team@sabnzbd.org
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
Release Notes - SABnzbd 3.0.2 RC 1
|
||||
Release Notes - SABnzbd 3.0.2
|
||||
=========================================================
|
||||
|
||||
## Bugfixes since 3.0.1
|
||||
- Priority was not parsed correctly if supplied as through the API.
|
||||
- API-call `addfile` could fail if `name` and `nzbfile` were used.
|
||||
- Permissions were still not set correctly when creating directories.
|
||||
- Propagation delay label was shown even if no delay was activated.
|
||||
- Reading RSS feed with no categories set could result in crash.
|
||||
- Jobs with numeric names could crash post-processing.
|
||||
- Jobs with missing articles could result in crash.
|
||||
- macOS: changed the power assertion to `NoIdleSleep`.
|
||||
- Windows: end-of-queue-script did not run on Windows.
|
||||
- Windows: crash if the virus scanner removed the certificate bundle.
|
||||
|
||||
## Bugfixes since 3.0.0
|
||||
|
||||
@@ -1703,9 +1703,7 @@ if __name__ == "__main__":
|
||||
# This code is made with trial-and-error, please improve!
|
||||
class startApp(Thread):
|
||||
def run(self):
|
||||
logging.info("[osx] sabApp Starting - starting main thread")
|
||||
main()
|
||||
logging.info("[osx] sabApp Stopping - main thread quit ")
|
||||
AppHelper.stopEventLoop()
|
||||
|
||||
sabApp = startApp()
|
||||
|
||||
@@ -848,10 +848,10 @@ def change_queue_complete_action(action, new=True):
|
||||
|
||||
def run_script(script):
|
||||
""" Run a user script (queue complete only) """
|
||||
command = [os.path.join(cfg.script_dir.get_path(), script)]
|
||||
if os.path.exists(command[0]):
|
||||
script_path = filesystem.make_script_path(script)
|
||||
if script_path:
|
||||
try:
|
||||
stup, need_shell, command, creationflags = sabnzbd.newsunpack.build_command(command)
|
||||
stup, need_shell, command, creationflags = sabnzbd.newsunpack.build_command([script_path])
|
||||
logging.info("Spawning external command %s", command)
|
||||
subprocess.Popen(
|
||||
command,
|
||||
|
||||
@@ -350,7 +350,7 @@ def _api_translate(name, output, kwargs):
|
||||
def _api_addfile(name, output, kwargs):
|
||||
""" API: accepts name, output, pp, script, cat, priority, nzbname """
|
||||
# Normal upload will send the nzb in a kw arg called name or nzbfile
|
||||
if not name:
|
||||
if not name or isinstance(name, str):
|
||||
name = kwargs.get("nzbfile", None)
|
||||
if hasattr(name, "file") and hasattr(name, "filename") and name.filename:
|
||||
cat = kwargs.get("cat")
|
||||
|
||||
@@ -710,15 +710,15 @@ class NzbQueue:
|
||||
Not locked for performance, since it only reads the queue
|
||||
"""
|
||||
# Pre-calculate propagation delay
|
||||
propagtion_delay = float(cfg.propagation_delay() * 60)
|
||||
propagation_delay = float(cfg.propagation_delay() * 60)
|
||||
for nzo in self.__nzo_list:
|
||||
# Not when queue paused and not a forced item
|
||||
if nzo.status not in (Status.PAUSED, Status.GRABBING) or nzo.priority == TOP_PRIORITY:
|
||||
# Check if past propagation delay, or forced
|
||||
if (
|
||||
not propagtion_delay
|
||||
not propagation_delay
|
||||
or nzo.priority == TOP_PRIORITY
|
||||
or (nzo.avg_stamp + propagtion_delay) < time.time()
|
||||
or (nzo.avg_stamp + propagation_delay) < time.time()
|
||||
):
|
||||
if not nzo.server_in_try_list(server):
|
||||
article = nzo.get_article(server, servers)
|
||||
|
||||
@@ -1345,8 +1345,9 @@ class NzbObject(TryList):
|
||||
labels.append(T("WAIT %s sec") % dif)
|
||||
|
||||
# Propagation delay label
|
||||
if (self.avg_stamp + float(cfg.propagation_delay() * 60)) > time.time() and self.priority != TOP_PRIORITY:
|
||||
wait_time = int((self.avg_stamp + float(cfg.propagation_delay() * 60) - time.time()) / 60 + 0.5)
|
||||
propagation_delay = float(cfg.propagation_delay() * 60)
|
||||
if propagation_delay and self.avg_stamp + propagation_delay > time.time() and self.priority != TOP_PRIORITY:
|
||||
wait_time = int((self.avg_stamp + propagation_delay - time.time()) / 60 + 0.5)
|
||||
labels.append(T("PROPAGATING %s min") % wait_time) # Queue indicator while waiting for propagation of post
|
||||
|
||||
return labels
|
||||
|
||||
@@ -791,7 +791,7 @@ def _get_link(entry):
|
||||
except AttributeError:
|
||||
try: # nzb.su
|
||||
category = entry.tags[0]["term"]
|
||||
except (AttributeError, KeyError):
|
||||
except (AttributeError, IndexError, KeyError):
|
||||
try:
|
||||
category = entry.description
|
||||
except AttributeError:
|
||||
|
||||
@@ -45,12 +45,16 @@ def keep_awake(reason):
|
||||
Multiple calls allowed.
|
||||
"""
|
||||
global assertion_id
|
||||
kIOPMAssertionTypeNoIdleSleep = "PreventUserIdleSystemSleep"
|
||||
kIOPMAssertionLevelOn = 255
|
||||
errcode, assertion_id = IOPMAssertionCreateWithName(
|
||||
kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, reason, None
|
||||
)
|
||||
return errcode == 0
|
||||
|
||||
# Each assertion needs to be released, so make sure to only set it once
|
||||
if not assertion_id:
|
||||
kIOPMAssertionTypeNoIdleSleep = "NoIdleSleepAssertion"
|
||||
kIOPMAssertionLevelOn = 255
|
||||
errcode, assertion_id = IOPMAssertionCreateWithName(
|
||||
kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, reason, None
|
||||
)
|
||||
return errcode == 0
|
||||
return True
|
||||
|
||||
|
||||
def allow_sleep():
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
|
||||
# You MUST use double quotes (so " and not ')
|
||||
|
||||
__version__ = "3.0.1"
|
||||
__baseline__ = "9a4be70734dbf7ac60f5d4d308a8ff1223206503"
|
||||
__version__ = "3.0.2"
|
||||
__baseline__ = "51cc7659493b8f98b5da7537831d1a56f2777775"
|
||||
|
||||
@@ -59,3 +59,17 @@ class TestSleepless:
|
||||
sleepless.allow_sleep()
|
||||
assert not self.check_msg_in_assertions()
|
||||
assert sleepless.assertion_id is None
|
||||
|
||||
def test_sleepless_multi_call(self):
|
||||
# If we set it twice, is it still cleared with one call
|
||||
assert not self.check_msg_in_assertions()
|
||||
assert sleepless.assertion_id is None
|
||||
|
||||
sleepless.keep_awake(self.sleep_msg)
|
||||
time.sleep(2)
|
||||
sleepless.keep_awake(self.sleep_msg)
|
||||
assert self.check_msg_in_assertions()
|
||||
|
||||
sleepless.allow_sleep()
|
||||
assert not self.check_msg_in_assertions()
|
||||
assert sleepless.assertion_id is None
|
||||
|
||||
Reference in New Issue
Block a user