mirror of
https://github.com/alexta69/metube.git
synced 2025-04-02 20:07:36 +03:00
Adds 'pending' to response for GET /history
Allows for some additional integration opportunities by including "pending" items in the json reponse to /history.
This commit is contained in:
parent
4c26fb197a
commit
6255e490c7
1 changed files with 3 additions and 1 deletions
|
@ -165,12 +165,14 @@ async def start(request):
|
|||
|
||||
@routes.get(config.URL_PREFIX + 'history')
|
||||
async def history(request):
|
||||
history = { 'done': [], 'queue': []}
|
||||
history = { 'done': [], 'queue': [], 'pending': []}
|
||||
|
||||
for _ ,v in dqueue.queue.saved_items():
|
||||
history['queue'].append(v)
|
||||
for _ ,v in dqueue.done.saved_items():
|
||||
history['done'].append(v)
|
||||
for _ ,v in dqueue.pending.saved_items():
|
||||
history['pending'].append(v)
|
||||
|
||||
return web.Response(text=serializer.encode(history))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue