From 77de256ba5534e816d3de5bfe289f0c5423aa242 Mon Sep 17 00:00:00 2001 From: codepoet80 Date: Thu, 7 Jan 2021 09:44:58 -0500 Subject: [PATCH] handle custom quality requests per discussion --- app/ytdl.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/ytdl.py b/app/ytdl.py index 5da8b06..562d20a 100644 --- a/app/ytdl.py +++ b/app/ytdl.py @@ -36,8 +36,9 @@ class Download: self.download_dir = download_dir if quality == 'best': self.format = None - elif quality == 'retro': - self.format = f'bestvideo[ext=mp4]+bestaudio[ext=aac]/best[ext=mp4]/best' + elif 'custom' in quality: + quality = quality.replace('custom:', '') + self.format = f'{quality}' elif quality in ('1080p', '720p', '480p'): res = quality[:-1] self.format = f'bestvideo[height<={res}]+bestaudio/best[height<={res}]'