From 48e407c2bd7b7c62ce747392ca2bda50d63c1fe9 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 16 Nov 2022 02:25:53 +0100 Subject: Youtube: add shorts and live streaming channel pages --- plugins/Youtube.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index de8a0c3..1088df9 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -103,7 +103,15 @@ namespace QuickMedia { class YoutubeChannelPage : public LazyFetchPage, public TrackablePage { public: - YoutubeChannelPage(Program *program, std::string url, std::string continuation_token, std::string title) : LazyFetchPage(program), TrackablePage(title, url), url(url), continuation_token(std::move(continuation_token)), title(title) {} + enum class Type { + VIDEOS, + SHORTS, + LIVE + }; + + static void create_each_type(Program *program, std::string url, std::string continuation_token, std::string title, std::vector &tabs); + + YoutubeChannelPage(Program *program, std::string url, std::string continuation_token, std::string title, Type type); const char* get_title() const override { return title.c_str(); } bool search_is_filter() override { return false; } SearchResult search(const std::string &str, BodyItems &result_items) override; @@ -122,6 +130,7 @@ namespace QuickMedia { std::string continuation_token; const std::string title; int current_page = 0; + Type type; }; struct YoutubeSubscriptionTaskResult { -- cgit v1.2.3