diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-11-16 02:25:53 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-11-16 02:25:53 +0100 |
commit | 48e407c2bd7b7c62ce747392ca2bda50d63c1fe9 (patch) | |
tree | 30dfb6cab2acdf7f50e42dbd98c3523874cf2dea /plugins | |
parent | ceddf6d67b43a99c774132baf099f4a58daa613e (diff) |
Youtube: add shorts and live streaming channel pages
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Youtube.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
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<Tab> &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 { |