aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-05-13 23:30:20 +0200
committerdec05eba <dec05eba@protonmail.com>2021-05-13 23:30:20 +0200
commitacb6ac0a04e800a79876908fd1fdb98dc7e93678 (patch)
treee8d0e97b3ac22d8ee1fc5b5a515047bf4a173014 /plugins
parent4af866c610a8f6650a5d2c5045c085d9af7d7951 (diff)
Show local time for nyaa.si, soundcloud and spotify. Add sukebei
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NyaaSi.hpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/NyaaSi.hpp b/plugins/NyaaSi.hpp
index 13cc437..45c2f7b 100644
--- a/plugins/NyaaSi.hpp
+++ b/plugins/NyaaSi.hpp
@@ -3,18 +3,22 @@
#include "Page.hpp"
namespace QuickMedia {
+ void get_nyaa_si_categories(BodyItems &result_items);
+ void get_sukebei_categories(BodyItems &result_items);
+
class NyaaSiCategoryPage : public Page {
public:
- NyaaSiCategoryPage(Program *program) : Page(program) {}
- const char* get_title() const override { return "Select category"; }
+ NyaaSiCategoryPage(Program *program, bool is_sukebei) : Page(program), is_sukebei(is_sukebei) {}
+ const char* get_title() const override { return is_sukebei ? "Select sukebei category" : "Select nyaa.si category"; }
PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override;
bool clear_search_after_submit() override { return true; }
- void get_categories(BodyItems &result_items);
+
+ const bool is_sukebei;
};
class NyaaSiSearchPage : public Page {
public:
- NyaaSiSearchPage(Program *program, std::string category_name, std::string category_id) : Page(program), category_name(std::move(category_name)), category_id(std::move(category_id)) {}
+ NyaaSiSearchPage(Program *program, std::string category_name, std::string category_id, std::string domain) : Page(program), category_name(std::move(category_name)), category_id(std::move(category_id)), domain(std::move(domain)) {}
const char* get_title() const override { return category_name.c_str(); }
bool search_is_filter() override { return false; }
SearchResult search(const std::string &str, BodyItems &result_items) override;
@@ -23,6 +27,7 @@ namespace QuickMedia {
const std::string category_name;
const std::string category_id;
+ const std::string domain;
};
class NyaaSiTorrentPage : public Page {