From 2241473b6bb6dcabd56ab566c983282a3d45955d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 30 Oct 2023 23:01:47 +0100 Subject: Youtube: do proper playlist pagination, show playlist videos views and uploaded date --- plugins/Youtube.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index 22cb9e5..77aa86c 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -157,14 +157,16 @@ namespace QuickMedia { class YoutubePlaylistPage : public LazyFetchPage { public: - YoutubePlaylistPage(Program *program, std::string url, std::string title) : - LazyFetchPage(program), url(std::move(url)), title(std::move(title)) {} + YoutubePlaylistPage(Program *program, const std::string &url, std::string title); const char* get_title() const override { return title.c_str(); } + PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override; PluginResult submit(const SubmitArgs &args, std::vector &result_tabs) override; PluginResult lazy_fetch(BodyItems &result_items) override; private: - std::string url; + std::string playlist_id; std::string title; + std::string continuation_token; + bool reached_end = false; }; class YoutubeVideoPage : public VideoPage { -- cgit v1.2.3