diff options
author | Alex <alexta69@gmail.com> | 2019-12-13 22:43:58 +0200 |
---|---|---|
committer | Alex <alexta69@gmail.com> | 2019-12-13 22:43:58 +0200 |
commit | 13e690dd63af0102cf682af79cdceb782da82abf (patch) | |
tree | 9e33d5fa85bf0f2ba353a91eae19d6a3af5f1869 /app/main.py | |
parent | recursive add (download entire channels) (diff) | |
download | metube-13e690dd63af0102cf682af79cdceb782da82abf.tar.gz metube-13e690dd63af0102cf682af79cdceb782da82abf.tar.bz2 metube-13e690dd63af0102cf682af79cdceb782da82abf.zip |
add quality selection
Diffstat (limited to 'app/main.py')
-rw-r--r-- | app/main.py | 5 |
1 files changed, 3 insertions, 2 deletions
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')
|