aboutsummaryrefslogtreecommitdiff
path: root/src/VideoPlayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VideoPlayer.cpp')
-rw-r--r--src/VideoPlayer.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 9d857ca..e13f55f 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -225,13 +225,16 @@ namespace QuickMedia {
std::string ytdl_format;
if(startup_args.no_video)
- ytdl_format = "--ytdl-format=bestaudio/best";
+ ytdl_format = "--ytdl-format=(bestaudio/best)[protocol=https]";
else
- ytdl_format = "--ytdl-format=bestvideo[ext=mp4][height<=?" + std::to_string(startup_args.monitor_height) + "]+bestaudio/best";
+ ytdl_format = "--ytdl-format=(bestvideo[ext=mp4][height<=?" + std::to_string(startup_args.monitor_height) + "]+bestaudio/best)[protocol=https]";
- args.push_back("--ytdl=no");
- if(startup_args.use_youtube_dl)
+ if(startup_args.use_youtube_dl) {
+ args.push_back("--ytdl=yes");
args.push_back(ytdl_format.c_str());
+ } else {
+ args.push_back("--ytdl=no");
+ }
// TODO: Properly escape referer quotes
std::string referer_arg = "--http-header-fields=Referer: " + startup_args.referer;