allow custom video formats in backend

This commit is contained in:
ashnitman 2021-01-07 17:51:14 +02:00
parent 8e93c01c54
commit 62602b19c9

View file

@ -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