aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Shnitman <alexta69@gmail.com>2021-08-19 22:15:48 +0300
committerAlex Shnitman <alexta69@gmail.com>2021-08-19 22:17:01 +0300
commit2b3cd13bfd4aa55e0871354056256317943ad5e0 (patch)
treed1331ad9413b3cf82aeae96761a877ca3e7566a2 /app
parentswitched to the yt-dlp fork of youtube-dl (closes #41) (diff)
downloadmetube-2b3cd13bfd4aa55e0871354056256317943ad5e0.tar.gz
metube-2b3cd13bfd4aa55e0871354056256317943ad5e0.tar.bz2
metube-2b3cd13bfd4aa55e0871354056256317943ad5e0.zip
prefer mp4 format
Diffstat (limited to 'app')
-rw-r--r--app/ytdl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/ytdl.py b/app/ytdl.py
index 47cfdcd..53dacd6 100644
--- a/app/ytdl.py
+++ b/app/ytdl.py
@@ -36,10 +36,10 @@ class Download:
self.download_dir = download_dir
self.output_template = output_template
if quality == 'best':
- self.format = None
+ self.format = 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'
elif quality in ('1440p', '1080p', '720p', '480p'):
res = quality[:-1]
- self.format = f'bestvideo[height<={res}]+bestaudio'
+ self.format = f'bestvideo[height<={res}][ext=mp4]+bestaudio[ext=m4a]/best[height<={res}][ext=mp4]/best[height<={res}]'
elif quality == 'audio':
self.format = 'bestaudio'
elif quality.startswith('custom:'):
bgstack15