mirror of
https://github.com/sabnzbd/sabnzbd.git
synced 2026-09-08 11:44:34 -04:00
Don't start when not set to +Unpack and abort if Category changed
This commit is contained in:
1 parent
68445d0409
commit
a16aa17c17
3 files changed
+6
-1
No files matched your search
@@ -82,7 +82,7 @@ class DirectUnpacker(threading.Thread):
|
||||
pass
|
||||
|
||||
def check_requirements(self):
|
||||
if self.killed or cfg.direct_unpack() < 1 or sabnzbd.newsunpack.RAR_PROBLEM:
|
||||
if self.killed or not self.nzo.unpack or cfg.direct_unpack() < 1 or sabnzbd.newsunpack.RAR_PROBLEM:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
@@ -322,6 +322,8 @@ class NzbQueue(object):
|
||||
nzo.set_pp(pp)
|
||||
if explicit_priority is None:
|
||||
self.set_priority(nzo_id, prio)
|
||||
# Abort any ongoing unpacking if the category changed
|
||||
nzo.abort_direct_unpacker()
|
||||
result += 1
|
||||
return result
|
||||
|
||||
|
||||
@@ -1133,6 +1133,9 @@ class NzbObject(TryList):
|
||||
def set_pp(self, value):
|
||||
self.repair, self.unpack, self.delete = sabnzbd.pp_to_opts(value)
|
||||
logging.info('Set pp=%s for job %s', value, self.final_name)
|
||||
# Abort unpacking if not desired anymore
|
||||
if not self.unpack:
|
||||
self.abort_direct_unpacker()
|
||||
self.save_to_disk()
|
||||
|
||||
@property
|
||||
|
||||
Reference in new issue
Block a user