diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-10-30 23:01:47 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-10-30 23:01:47 +0100 |
commit | 2241473b6bb6dcabd56ab566c983282a3d45955d (patch) | |
tree | 11efeabb80415e5b9deb4f02693ad8f7c5b8236d /plugins | |
parent | bcd40f1beeb5cde7f9ac20ade692a6246dd4deab (diff) |
Youtube: do proper playlist pagination, show playlist videos views and uploaded date
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Youtube.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
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<Tab> &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 { |