aboutsummaryrefslogtreecommitdiff
path: root/plugins/NyaaSi.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-18 01:10:18 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-18 17:07:47 +0200
commit12c59fddcf1201536c3bee8db4e0d6ac8964fde6 (patch)
treeeeb7b5dcd1aa24599fb73743a840547c8d8035c8 /plugins/NyaaSi.hpp
parent94d217c957183844c6267fa34d6b5778123f88f8 (diff)
Initial nyaa.si support
Diffstat (limited to 'plugins/NyaaSi.hpp')
-rw-r--r--plugins/NyaaSi.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/NyaaSi.hpp b/plugins/NyaaSi.hpp
new file mode 100644
index 0000000..428d8b5
--- /dev/null
+++ b/plugins/NyaaSi.hpp
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "Plugin.hpp"
+#include <thread>
+#include <mutex>
+#include <condition_variable>
+
+namespace QuickMedia {
+ class Program;
+
+ class NyaaSi : public Plugin {
+ public:
+ NyaaSi();
+ ~NyaaSi() override;
+ PluginResult get_front_page(BodyItems &result_items) override;
+ SearchResult content_list_search(const std::string &list_url, const std::string &text, BodyItems &result_items) override;
+ bool search_suggestions_has_thumbnails() const override { return true; }
+ bool search_results_has_thumbnails() const override { return false; }
+ int get_search_delay() const override { return 150; }
+ Page get_page_after_search() const override { return Page::CONTENT_LIST; }
+ bool search_is_filter() override { return true; }
+ bool content_list_search_is_filter() const override { return false; }
+ PluginResult get_content_list(const std::string &url, BodyItems &result_items) override;
+ PluginResult get_content_details(const std::string &list_url, const std::string &url, BodyItems &result_items) override;
+ };
+} \ No newline at end of file