From 95295f99cbb5d565ba3992da732da5514c28391a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 25 Jun 2023 18:44:35 +0200 Subject: Youtube: force https protocol, fixes broken seek (and resume) --- src/VideoPlayer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') 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; -- cgit v1.2.3