aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-11-16 02:25:53 +0100
committerdec05eba <dec05eba@protonmail.com>2022-11-16 02:25:53 +0100
commit48e407c2bd7b7c62ce747392ca2bda50d63c1fe9 (patch)
tree30dfb6cab2acdf7f50e42dbd98c3523874cf2dea /plugins
parentceddf6d67b43a99c774132baf099f4a58daa613e (diff)
Youtube: add shorts and live streaming channel pages
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Youtube.hpp11
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 {