Browse Source

Fix API compatibility of queue.

The new statuses TO_PP and DELETED should not be returned by the API.
Tools may not be able to handle them and they are only useful for internal purposes.
tags/1.0.1
shypike 9 years ago
parent
commit
a767ef6aed
  1. 4
      sabnzbd/api.py

4
sabnzbd/api.py

@ -1245,6 +1245,10 @@ def build_queue(web_dir=None, root=None, verbose=False, prim=True, webdir='', ve
slot['status'] = Status.DOWNLOADING
found_active = True
else:
# ensure compatibility of API status
if status == Status.TO_PP: status = Status.DOWNLOADING
if status == Status.DELETED: status = Status.FAILED
slot['status'] = "%s" % (status)
if priority == TOP_PRIORITY:
slot['priority'] = 'Force'

Loading…
Cancel
Save