Count NONE as success for NZBGet. fix #2135
This commit is contained in:
1 parent
43af25a30e
commit
25693d44eb
1 file changed
+5
-4
@@ -142,7 +142,7 @@ class NZBGet(Downloader):
|
|||||||
statuses.append({
|
statuses.append({
|
||||||
'id': nzb_id,
|
'id': nzb_id,
|
||||||
'name': item['NZBFilename'],
|
'name': item['NZBFilename'],
|
||||||
'status': 'completed' if item['ParStatus'] == 'SUCCESS' and item['ScriptStatus'] == 'SUCCESS' else 'failed',
|
'status': 'completed' if item['ParStatus'] in ['SUCCESS','NONE'] and item['ScriptStatus'] in ['SUCCESS','NONE'] else 'failed',
|
||||||
'original_status': item['ParStatus'] + ', ' + item['ScriptStatus'],
|
'original_status': item['ParStatus'] + ', ' + item['ScriptStatus'],
|
||||||
'timeleft': str(timedelta(seconds = 0)),
|
'timeleft': str(timedelta(seconds = 0)),
|
||||||
'folder': ss(item['DestDir'])
|
'folder': ss(item['DestDir'])
|
||||||
@@ -178,9 +178,10 @@ class NZBGet(Downloader):
|
|||||||
path = None
|
path = None
|
||||||
|
|
||||||
for hist in history:
|
for hist in history:
|
||||||
if hist['Parameters'] and hist['Parameters']['couchpotato'] and hist['Parameters']['couchpotato'] == item['id']:
|
for param in hist['Parameters']:
|
||||||
nzb_id = hist['ID']
|
if param['Name'] == 'couchpotato' and param['Value'] == item['id']:
|
||||||
path = hist['DestDir']
|
nzb_id = hist['ID']
|
||||||
|
path = hist['DestDir']
|
||||||
|
|
||||||
if nzb_id and path and rpc.editqueue('HistoryDelete', 0, "", [tryInt(nzb_id)]):
|
if nzb_id and path and rpc.editqueue('HistoryDelete', 0, "", [tryInt(nzb_id)]):
|
||||||
shutil.rmtree(path, True)
|
shutil.rmtree(path, True)
|
||||||
|
|||||||
Reference in new issue
Block a user