blob: 97b69e79341138beb2e7be82a3d81cef818caf79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#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;
SearchResult content_list_search_page(const std::string &list_url, const std::string &text, int page, 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;
private:
SearchResult search_page(const std::string &list_url, const std::string &text, int page, BodyItems &result_items);
};
}
|