aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorashnitman <alex.shnitman@cyberark.com>2021-01-07 17:51:14 +0200
committerashnitman <alex.shnitman@cyberark.com>2021-01-07 17:51:14 +0200
commit62602b19c998b7869dfeb363de27df9b7a863781 (patch)
tree973d94734ed87e8a3764e55754cd718c695f3015 /app
parentfix python-socketio version to 4.x so that ngx-socket-io continues to work (c... (diff)
downloadmetube-62602b19c998b7869dfeb363de27df9b7a863781.tar.gz
metube-62602b19c998b7869dfeb363de27df9b7a863781.tar.bz2
metube-62602b19c998b7869dfeb363de27df9b7a863781.zip
allow custom video formats in backend
Diffstat (limited to 'app')
-rw-r--r--app/ytdl.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/ytdl.py b/app/ytdl.py
index 80706db..76c0f73 100644
--- a/app/ytdl.py
+++ b/app/ytdl.py
@@ -39,6 +39,8 @@ class Download:
elif quality in ('1080p', '720p', '480p'):
res = quality[:-1]
self.format = f'bestvideo[height<={res}]+bestaudio/best[height<={res}]'
+ elif quality.startswith('custom:'):
+ self.format = quality[7:]
else:
raise Exception(f'unknown quality {quality}')
self.info = info
bgstack15