Don't start when not set to +Unpack and abort if Category changed

This commit is contained in:
Safihre committed 2017-07-15 17:02:20 +02:00
1 parent 68445d0409
commit a16aa17c17
3 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -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
+2
View File
@@ -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
+3
View File
@@ -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