diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-06-22 16:07:20 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-06-22 16:07:20 +0200 |
commit | e4792f46d545263d16db21bd0caf71345a69b63f (patch) | |
tree | e12c1d01060e6559b17c0928363446b4e49b3232 /plugins | |
parent | e5518e0d876287d047312a59263d35bd567b2c0c (diff) |
Only do youtube redirect on failure to load video
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Youtube.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
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<MediaChapter> &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: |