diff options
author | Alex Shnitman <alexta69@gmail.com> | 2021-03-04 11:10:39 +0200 |
---|---|---|
committer | Alex Shnitman <alexta69@gmail.com> | 2021-03-04 11:10:39 +0200 |
commit | 52d8d64cb5355df319d6b70805044681ec8f4e22 (patch) | |
tree | 8a16d0d6a14e096ba7fcf4a1fd98b56419e1b636 /app | |
parent | upgrade dependencies (diff) | |
download | metube-52d8d64cb5355df319d6b70805044681ec8f4e22.tar.gz metube-52d8d64cb5355df319d6b70805044681ec8f4e22.tar.bz2 metube-52d8d64cb5355df319d6b70805044681ec8f4e22.zip |
add audio-only download (closes #20)
Diffstat (limited to 'app')
-rw-r--r-- | app/ytdl.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/ytdl.py b/app/ytdl.py index 3f684d8..dfdc4fd 100644 --- a/app/ytdl.py +++ b/app/ytdl.py @@ -38,7 +38,9 @@ class Download: self.format = None
elif quality in ('1440p', '1080p', '720p', '480p'):
res = quality[:-1]
- self.format = f'bestvideo[height<={res}]+bestaudio/best[height<={res}]'
+ self.format = f'bestvideo[height<={res}]+bestaudio'
+ elif quality == 'audio':
+ self.format = 'bestaudio'
elif quality.startswith('custom:'):
self.format = quality[7:]
else:
|