From dfa4e24f72996d507e710fc6839367536237c501 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 25 Jun 2021 22:52:47 +0200 Subject: Rework youtube redirect code --- plugins/Youtube.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index 5428de0..1b17c7b 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -24,7 +24,9 @@ namespace QuickMedia { }; bool youtube_url_extract_id(const std::string &youtube_url, std::string &youtube_video_id); - void youtube_custom_redirect(std::string &video_url, std::string &audio_url); + // |video_url| or |audio_url| will be empty if there is an error and false will be returned. + // If false is returned from |active_handler|, then this function is cancelled. + bool youtube_custom_redirect(std::string &video_url, std::string &audio_url, int &video_content_length, int &audio_content_length, std::function active_handler); class YoutubeSearchPage : public LazyFetchPage { public: -- cgit v1.2.3