From 62602b19c998b7869dfeb363de27df9b7a863781 Mon Sep 17 00:00:00 2001 From: ashnitman Date: Thu, 7 Jan 2021 17:51:14 +0200 Subject: allow custom video formats in backend --- app/ytdl.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app') 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 -- cgit