mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
Fixed a bug in autoProcessMovie, small typo
This commit is contained in:
parent
1f48c59960
commit
47ced8a8a2
1 changed files with 9 additions and 8 deletions
|
@ -65,20 +65,21 @@ class autoProcessMovie:
|
|||
if release['status'] != 'snatched':
|
||||
continue
|
||||
|
||||
if clientAgent != 'manual':
|
||||
if release['download_info']['download'] == clientAgent:
|
||||
return release
|
||||
else:
|
||||
date = datetime.datetime.fromtimestamp(release['last_edit'])
|
||||
last_edit[date] = {}
|
||||
last_edit[date].update(release)
|
||||
|
||||
if download_id:
|
||||
if release['download_info']['id'] == download_id:
|
||||
return release
|
||||
|
||||
# store releases by datetime just incase we need to use this info
|
||||
last_edit.update({datetime.datetime.fromtimestamp(release['last_edit']):release})
|
||||
|
||||
if last_edit:
|
||||
last_edit = sorted(last_edit.items())
|
||||
if clientAgent != 'manual':
|
||||
for item in last_edit:
|
||||
release = item[1]
|
||||
if release['download_info']['downloader'] == clientAgent:
|
||||
return release
|
||||
|
||||
release = last_edit[0][1]
|
||||
return release
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue