diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-06-07 04:31:30 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-06-07 04:31:30 +0200 |
commit | a0dbe64272d051671bc120b1845c7485264b097d (patch) | |
tree | fdd5daf29cfd541624b9c5f06e9a171f7becd58b /plugins | |
parent | 5ccd94a771cf1031b837c7bc4d0baeab4b810a38 (diff) |
Add support for mangatown
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Mangatown.hpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/plugins/Mangatown.hpp b/plugins/Mangatown.hpp new file mode 100644 index 0000000..bfb1f6a --- /dev/null +++ b/plugins/Mangatown.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "Manga.hpp" +#include <functional> +#include <mutex> + +namespace QuickMedia { + class Mangatown : public Manga { + public: + Mangatown() : Manga("mangatown") {} + SearchResult search(const std::string &url, BodyItems &result_items) override; + SuggestionResult update_search_suggestions(const std::string &text, BodyItems &result_items) override; + ImageResult get_number_of_images(const std::string &url, int &num_images) override; + bool search_suggestions_has_thumbnails() const override { return false; } + 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::EPISODE_LIST; } + + ImageResult for_each_page_in_chapter(const std::string &chapter_url, PageCallback callback) override; + + bool extract_id_from_url(const std::string &url, std::string &manga_id) override; + private: + std::string last_chapter_url_num_images; + int last_num_pages = 0; + std::mutex image_urls_mutex; + }; +}
\ No newline at end of file |