aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Mangatown.hpp1
-rw-r--r--plugins/Page.hpp1
-rw-r--r--plugins/Plugin.hpp1
-rw-r--r--plugins/Pornhub.hpp1
4 files changed, 4 insertions, 0 deletions
diff --git a/plugins/Mangatown.hpp b/plugins/Mangatown.hpp
index c85b5b7..151b4c2 100644
--- a/plugins/Mangatown.hpp
+++ b/plugins/Mangatown.hpp
@@ -10,6 +10,7 @@ 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:
bool extract_id_from_url(const std::string &url, std::string &manga_id) const;
diff --git a/plugins/Page.hpp b/plugins/Page.hpp
index 947f045..2adce85 100644
--- a/plugins/Page.hpp
+++ b/plugins/Page.hpp
@@ -21,6 +21,7 @@ namespace QuickMedia {
// Return empty |result_tabs| and PluginResult::OK to do nothing; which is useful for implementing custom actions on item submit
virtual PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) = 0;
+ // Note: If pagination is done by fetching the next page until we get to |page|, then the "current page" should be reset everytime |search| is called
virtual PluginResult get_page(const std::string &str, int page, BodyItems &result_items) { (void)str; (void)page; (void)result_items; return PluginResult::OK; }
virtual BodyItems get_related_media(const std::string &url);
diff --git a/plugins/Plugin.hpp b/plugins/Plugin.hpp
index d754445..2026319 100644
--- a/plugins/Plugin.hpp
+++ b/plugins/Plugin.hpp
@@ -39,4 +39,5 @@ namespace QuickMedia {
PluginResult download_result_to_plugin_result(DownloadResult download_result);
SearchResult download_result_to_search_result(DownloadResult download_result);
ImageResult download_result_to_image_result(DownloadResult download_result);
+ PluginResult search_result_to_plugin_result(SearchResult search_result);
} \ No newline at end of file
diff --git a/plugins/Pornhub.hpp b/plugins/Pornhub.hpp
index 195845f..b058bbe 100644
--- a/plugins/Pornhub.hpp
+++ b/plugins/Pornhub.hpp
@@ -9,6 +9,7 @@ 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;
};