From 75c610d1f65d741bbeba9f1ddeef60a6e9315427 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 7 Feb 2022 22:54:20 +0100 Subject: 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. --- plugins/Soundcloud.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/Soundcloud.hpp') diff --git a/plugins/Soundcloud.hpp b/plugins/Soundcloud.hpp index 5850fab..7e65cc1 100644 --- a/plugins/Soundcloud.hpp +++ b/plugins/Soundcloud.hpp @@ -11,7 +11,7 @@ namespace QuickMedia { SoundcloudPage(Program *program) : Page(program) {} virtual ~SoundcloudPage() = default; virtual const char* get_title() const override { return ""; } - PluginResult submit(const std::string &title, const std::string &url, std::vector &result_tabs) override; + PluginResult submit(const SubmitArgs &args, std::vector &result_tabs) override; }; class SoundcloudSearchPage : public LazyFetchPage { @@ -19,7 +19,7 @@ namespace QuickMedia { SoundcloudSearchPage(Program *program) : LazyFetchPage(program), submit_page(program) {} const char* get_title() const override { return "Search"; } bool search_is_filter() override { return false; } - PluginResult submit(const std::string &title, const std::string &url, std::vector &result_tabs) override; + PluginResult submit(const SubmitArgs &args, std::vector &result_tabs) override; SearchResult search(const std::string &str, BodyItems &result_items) override; PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override; PluginResult lazy_fetch(BodyItems &result_items) override; -- cgit v1.2.3