aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-15 17:18:05 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-15 17:18:05 +0200
commit83a4df36832156d08fbf04294164979efcaa06ab (patch)
tree5d91e60c930f90534dd627421ccc4a6c7142d42b /plugins
parentf06adfb0bd658b278fec6f19d7e7672ec33f695d (diff)
Youtube: fetch next page when reaching bottom of search (also fixes continuation)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Youtube.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp
index 0922b9d..007f398 100644
--- a/plugins/Youtube.hpp
+++ b/plugins/Youtube.hpp
@@ -9,9 +9,14 @@ namespace QuickMedia {
const char* get_title() const override { return "All"; }
bool search_is_filter() override { return false; }
SearchResult search(const std::string &str, BodyItems &result_items) override;
+ PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override;
PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override;
private:
- void search_suggestions_get_continuation(const std::string &url, const std::string &continuation_token, BodyItems &result_items);
+ PluginResult search_get_continuation(const std::string &url, const std::string &continuation_token, BodyItems &result_items);
+ private:
+ std::string search_url;
+ std::string continuation_token;
+ int current_page = 0;
};
class YoutubeVideoPage : public Page {