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) --- TODO | 3 ++- depends/mglpp | 2 +- example-config.json | 2 +- src/VideoPlayer.cpp | 11 +++++++---- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index 57dd50b..0bc4a58 100644 --- a/TODO +++ b/TODO @@ -277,4 +277,5 @@ Run ~/.config/quickmedia/script.sh or something like that for every body item an To make this work properly the script needs to be sent more information than the body item text only. It also needs plugin name, current tab (url, name), body item url, etc. Ctrl+H to show/hide dot files in file manager. -Dramacool search pagination. Search for "samurai" for example and see that the results are limited. \ No newline at end of file +Dramacool search pagination. Search for "samurai" for example and see that the results are limited. +Fix flickering on resize by creating a child window and draw on that. See: https://bugs.chromium.org/p/chromium/issues/detail?id=326995 \ No newline at end of file diff --git a/depends/mglpp b/depends/mglpp index c65b1f0..3a90965 160000 --- a/depends/mglpp +++ b/depends/mglpp @@ -1 +1 @@ -Subproject commit c65b1f012813c7412d9251f6dd94effe18002020 +Subproject commit 3a909655660fabd399fa387bf3abb3df8af6c076 diff --git a/example-config.json b/example-config.json index 1ab1718..9f5aeef 100644 --- a/example-config.json +++ b/example-config.json @@ -42,7 +42,7 @@ }, "youtube": { // If true, resume playback where you left off in youtube videos - "load_progress": true + "load_progress": false }, "matrix": { // List of homeservers to display in the "Room directory" tab 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