diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-06-25 22:52:47 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-06-25 22:52:47 +0200 |
commit | dfa4e24f72996d507e710fc6839367536237c501 (patch) | |
tree | d1d053d064738b7f188f1c5fc760886afec430f2 /plugins | |
parent | e616d1cc3ad60e314c92a8266a996244e02aaa6f (diff) |
Rework youtube redirect code
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Youtube.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<bool()> active_handler); class YoutubeSearchPage : public LazyFetchPage { public: |