From 033fbf3f1363c810d115ce9a531aea26ea9e1cf1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 17 Apr 2021 13:16:03 +0200 Subject: Fix mangakatana search when mangakatana redirect to the exact match --- plugins/MangaGeneric.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/MangaGeneric.hpp b/plugins/MangaGeneric.hpp index d58672a..4c99909 100644 --- a/plugins/MangaGeneric.hpp +++ b/plugins/MangaGeneric.hpp @@ -9,6 +9,8 @@ namespace QuickMedia { int page_start = 0; }; + // If |url_contains| is null, then any matching query is added. If |title_field| is "text", then the inner text is used. + // If |url_field| is null, then the current page is used instead. struct TextQuery { const char *html_query = nullptr; const char *title_field = nullptr; @@ -16,6 +18,7 @@ namespace QuickMedia { const char *url_contains = nullptr; }; + // If |field_contains| is null, then any matching query is added. If |field_name| is "text", then the inner text is used. struct ThumbnailQuery { const char *html_query = nullptr; const char *field_name = nullptr; @@ -92,12 +95,10 @@ namespace QuickMedia { // example.com/search?q=%s&page=%p // This is required. MangaGenericSearchPage& search_handler(const char *search_template, int page_start); - // If |url_contains| is null, then any matching query is added. If |title_field| is "text", then the inner text is used. // This is required. - MangaGenericSearchPage& text_handler(const char *html_query, const char *title_field, const char *url_field, const char *url_contains); - // If |field_contains| is null, then any matching query is added. If |field_name| is "text", then the inner text is used. + MangaGenericSearchPage& text_handler(std::vector queries); // This is optional. - MangaGenericSearchPage& thumbnail_handler(const char *html_query, const char *field_name, const char *field_contains); + MangaGenericSearchPage& thumbnail_handler(std::vector queries); // If |url_contains| is null, then any matching query is added. If |title_field| is "text", then the inner text is used. // This is required. @@ -130,8 +131,8 @@ namespace QuickMedia { std::string website_url; bool fail_on_http_error; SearchQuery search_query; - TextQuery text_query; - ThumbnailQuery thumbnail_query; + std::vector text_queries; + std::vector thumbnail_queries; ListChaptersQuery list_chapters_query; ListPageQuery list_page_query; MangaIdExtractor manga_id_extractor; -- cgit v1.2.3