diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-06-25 18:44:35 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-06-25 18:44:35 +0200 |
commit | 95295f99cbb5d565ba3992da732da5514c28391a (patch) | |
tree | 9dc43eccd38900bcaf94c048ecb2c9670d181a88 /src | |
parent | 2dd6c6f4b648af951d08ddd503dbb2ada8ddf5b6 (diff) |
Youtube: force https protocol, fixes broken seek (and resume)
Diffstat (limited to 'src')
-rw-r--r-- | src/VideoPlayer.cpp | 11 |
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; |