From e4792f46d545263d16db21bd0caf71345a69b63f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 22 Jun 2021 16:07:20 +0200 Subject: Only do youtube redirect on failure to load video --- plugins/Youtube.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index dcccc88..36094f0 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -24,6 +24,7 @@ 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); class YoutubeSearchPage : public LazyFetchPage { public: @@ -146,6 +147,7 @@ namespace QuickMedia { PluginResult load(std::string &title, std::string &channel_url, std::vector &chapters) override; void mark_watched() override; private: + PluginResult get_video_info(const std::string &video_id, Json::Value &json_root); void parse_format(const Json::Value &format_json, bool is_adaptive); void parse_formats(const Json::Value &streaming_data_json); private: -- cgit v1.2.3