From 13e690dd63af0102cf682af79cdceb782da82abf Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 13 Dec 2019 22:43:58 +0200 Subject: add quality selection --- app/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/main.py') diff --git a/app/main.py b/app/main.py index 8489e4f..1287705 100644 --- a/app/main.py +++ b/app/main.py @@ -62,9 +62,10 @@ dqueue = DownloadQueue(config, Notifier()) async def add(request): post = await request.json() url = post.get('url') - if not url: + quality = post.get('quality') + if not url or not quality: raise web.HTTPBadRequest() - status = await dqueue.add(url) + status = await dqueue.add(url, quality) return web.Response(text=serializer.encode(status)) @routes.post(config.URL_PREFIX + 'delete') -- cgit