diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-04-17 13:16:03 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-04-17 13:16:03 +0200 |
commit | 033fbf3f1363c810d115ce9a531aea26ea9e1cf1 (patch) | |
tree | 2a89743424201ac5195245694a1af609c2f7414e /plugins | |
parent | 23435ac30b25cd1a0a8d52c4a792d90f38300344 (diff) |
Fix mangakatana search when mangakatana redirect to the exact match
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/MangaGeneric.hpp | 13 |
1 files changed, 7 insertions, 6 deletions
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<TextQuery> queries); // This is optional. - MangaGenericSearchPage& thumbnail_handler(const char *html_query, const char *field_name, const char *field_contains); + MangaGenericSearchPage& thumbnail_handler(std::vector<ThumbnailQuery> 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<TextQuery> text_queries; + std::vector<ThumbnailQuery> thumbnail_queries; ListChaptersQuery list_chapters_query; ListPageQuery list_page_query; MangaIdExtractor manga_id_extractor; |