blob: 01311e18c5233c6655b03936ab389e57087d42ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#pragma once
#include "Plugin.hpp"
namespace QuickMedia {
class Manganelo : public Plugin {
public:
SearchResult search(const std::string &url, std::vector<std::unique_ptr<BodyItem>> &result_items, Page &next_page) override;
SuggestionResult update_search_suggestions(const std::string &text, std::vector<std::unique_ptr<BodyItem>> &result_items) override;
ImageResult get_image_by_index(const std::string &url, int index, std::string &image_data);
ImageResult get_number_of_images(const std::string &url, int &num_images);
bool search_suggestions_has_thumbnails() const override { return true; }
bool search_results_has_thumbnails() const override { return true; }
private:
// Caches url. If the same url is requested multiple times then the cache is used
ImageResult get_image_urls_for_chapter(const std::string &url);
private:
std::string last_chapter_url;
std::vector<std::string> last_chapter_image_urls;
};
}
|