aboutsummaryrefslogtreecommitdiff
path: root/plugins/NyaaSi.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NyaaSi.hpp')
-rw-r--r--plugins/NyaaSi.hpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/NyaaSi.hpp b/plugins/NyaaSi.hpp
index 3236fc5..103fea7 100644
--- a/plugins/NyaaSi.hpp
+++ b/plugins/NyaaSi.hpp
@@ -29,7 +29,7 @@ namespace QuickMedia {
DOWNLOADS_ASC
};
- class NyaaSiSearchPage : public Page {
+ class NyaaSiSearchPage : public Page, public TrackablePage {
public:
NyaaSiSearchPage(Program *program, std::string category_name, std::string category_id, std::string domain);
const char* get_title() const override { return title.c_str(); }
@@ -38,6 +38,9 @@ namespace QuickMedia {
PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override;
PluginResult submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) override;
+ TrackResult track(const std::string &str) override;
+ bool is_trackable() const override { return true; }
+
void set_sort_type(NyaaSiSortType sort_type);
const std::string category_name;
@@ -59,11 +62,14 @@ namespace QuickMedia {
NyaaSiSearchPage *search_page;
};
- class NyaaSiTorrentPage : public Page {
+ class NyaaSiTorrentPage : public Page, public TrackablePage {
public:
- NyaaSiTorrentPage(Program *program) : Page(program) {}
- const char* get_title() const override { return "Torrent"; }
+ NyaaSiTorrentPage(Program *program, std::string title) : Page(program), TrackablePage(std::move(title), "") {}
+ const char* get_title() const override { return content_title.c_str(); }
PluginResult submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) override;
bool submit_is_async() const override { return false; }
+
+ TrackResult track(const std::string &str) override;
+ bool is_trackable() const override { return true; }
};
} \ No newline at end of file