aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-06-25 18:44:35 +0200
committerdec05eba <dec05eba@protonmail.com>2023-06-25 18:44:35 +0200
commit95295f99cbb5d565ba3992da732da5514c28391a (patch)
tree9dc43eccd38900bcaf94c048ecb2c9670d181a88 /src
parent2dd6c6f4b648af951d08ddd503dbb2ada8ddf5b6 (diff)
Youtube: force https protocol, fixes broken seek (and resume)
Diffstat (limited to 'src')
-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;