From 9c1d43e772efb8f5af4b7ef5562fb433c8985697 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 29 Oct 2022 21:33:18 +0200 Subject: Youtube: allow opening youtube channels directly from url. Same with ctrl+i info menu --- plugins/Youtube.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/Youtube.hpp') diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index 1e84af1..6ce62e8 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -35,6 +35,7 @@ namespace QuickMedia { // Returns |url| if the url is already a youtube url std::string invidious_url_to_youtube_url(const std::string &url); bool youtube_url_extract_id(const std::string &youtube_url, std::string &youtube_video_id); + bool youtube_url_extract_channel_id(const std::string &youtube_url, std::string &channel_id, std::string &channel_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, int64_t &video_content_length, int64_t &audio_content_length, std::function active_handler); @@ -113,7 +114,7 @@ namespace QuickMedia { private: PluginResult search_get_continuation(const std::string &url, const std::string &continuation_token, BodyItems &result_items); private: - const std::string url; + std::string url; std::string continuation_token; const std::string title; int current_page = 0; -- cgit v1.2.3