aboutsummaryrefslogtreecommitdiff
path: root/plugins/MyAnimeList.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-02-07 22:54:20 +0100
committerdec05eba <dec05eba@protonmail.com>2022-02-07 22:55:11 +0100
commit75c610d1f65d741bbeba9f1ddeef60a6e9315427 (patch)
tree0dd79a5a7f35c89b9672d55fbf24cb1f6de13aa9 /plugins/MyAnimeList.hpp
parent9539a71dbeafdc4107d3b92eefada332ee45579a (diff)
Use one struct for all args in Page::submit instead of multiple args (easier to add new fields without changing code)
Also remove submit_body_item from page.
Diffstat (limited to 'plugins/MyAnimeList.hpp')
-rw-r--r--plugins/MyAnimeList.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/MyAnimeList.hpp b/plugins/MyAnimeList.hpp
index 192f0f3..8f35043 100644
--- a/plugins/MyAnimeList.hpp
+++ b/plugins/MyAnimeList.hpp
@@ -10,7 +10,7 @@ namespace QuickMedia {
bool search_is_filter() override { return false; }
bool submit_is_async() const override { return false; }
SearchResult search(const std::string &str, BodyItems &result_items) override;
- PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override;
+ PluginResult submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) override;
};
class MyAnimeListDetailsPage : public LazyFetchPage {
@@ -18,7 +18,7 @@ namespace QuickMedia {
MyAnimeListDetailsPage(Program *program, std::string url) : LazyFetchPage(program), url(std::move(url)) {}
const char* get_title() const override { return "Details"; }
bool submit_is_async() const override { return false; }
- PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override;
+ PluginResult submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) override;
PluginResult lazy_fetch(BodyItems &result_items) override;
private:
std::string url;
@@ -29,7 +29,7 @@ namespace QuickMedia {
MyAnimeListRecommendationsPage(Program *program, std::string url) : LazyFetchPage(program), url(std::move(url)) {}
const char* get_title() const override { return "Recommendations"; }
bool submit_is_async() const override { return false; }
- PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override;
+ PluginResult submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) override;
PluginResult lazy_fetch(BodyItems &result_items) override;
private:
std::string url;