Browse Source

Count NONE as success for NZBGet. fix #2135

pull/2140/merge
Ruud 12 years ago
parent
commit
25693d44eb
  1. 5
      couchpotato/core/downloaders/nzbget/main.py

5
couchpotato/core/downloaders/nzbget/main.py

@ -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,7 +178,8 @@ 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']:
if param['Name'] == 'couchpotato' and param['Value'] == item['id']:
nzb_id = hist['ID'] nzb_id = hist['ID']
path = hist['DestDir'] path = hist['DestDir']

Loading…
Cancel
Save