aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Shnitman <alexta69@gmail.com>2021-03-04 11:10:39 +0200
committerAlex Shnitman <alexta69@gmail.com>2021-03-04 11:10:39 +0200
commit52d8d64cb5355df319d6b70805044681ec8f4e22 (patch)
tree8a16d0d6a14e096ba7fcf4a1fd98b56419e1b636 /app
parentupgrade dependencies (diff)
downloadmetube-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.py4
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:
bgstack15