diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-08-09 20:05:48 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-08-09 20:24:43 +0200 |
commit | 809141aae58b6aaa70c07d845392d6ced86c3eb0 (patch) | |
tree | f7ac01d0dbbddab554f2f0b87d2d511a546dd289 | |
parent | b5dd15aedfbd619e7780b9357c35c429fe5c377c (diff) |
Manganelo: fix search
Fix old mangakakalot links, such as evil heart
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | src/plugins/MangaCombined.cpp | 3 | ||||
-rw-r--r-- | src/plugins/Manganelo.cpp | 15 |
3 files changed, 19 insertions, 2 deletions
@@ -226,4 +226,5 @@ Make saucenao work with encrypted images in matrix, or show an error as this is Body image cache (async image loader) should take requested size into consideration, because the same image can be requested at multiple sizes and we dont want to cache the smaller sized image for both. To make quickmedia more resilient against broken youtube videos, quickmedia should try other quality if video/audio fails to play. Also do that if the download is stuck/slow for the current quality. Make youtube work with age restricted copy righted videos, such as https://www.youtube.com/watch?v=7n3dP_1KqBw. Age restricted videos also play slowly because they have url part that needs to be decoded. -Upload media once in 4chan, on comment enter and then re-use that after solving captcha; instead of reuploading video after each captcha retry. If possible...
\ No newline at end of file +Upload media once in 4chan, on comment enter and then re-use that after solving captcha; instead of reuploading video after each captcha retry. If possible... +Support migration from one manga service to another, automatically by selecting the manga to migrate from which service (or select all). Also do that in automedia. Give error if it's not possible to do automatically and show option to manually select the matching manga/chapter. Quickmedia should also be able to automatically migrate automedia in the same process or a seperate option.
\ No newline at end of file diff --git a/src/plugins/MangaCombined.cpp b/src/plugins/MangaCombined.cpp index fca5705..ce08b1c 100644 --- a/src/plugins/MangaCombined.cpp +++ b/src/plugins/MangaCombined.cpp @@ -93,6 +93,9 @@ namespace QuickMedia { SearchResult MangaCombinedSearchPage::search(const std::string &str, BodyItems &result_items) { search_threads.clear(); + if(str.empty()) + return SearchResult::OK; + for(auto &search_page : search_pages) { search_threads.push_back(std::make_pair(&search_page, AsyncTask<BodyItems>([&str, &search_page]() { BodyItems search_page_body_items; diff --git a/src/plugins/Manganelo.cpp b/src/plugins/Manganelo.cpp index 8186155..5a75d5d 100644 --- a/src/plugins/Manganelo.cpp +++ b/src/plugins/Manganelo.cpp @@ -116,6 +116,19 @@ namespace QuickMedia { return 0; }, &chapters_items); + result = quickmedia_html_find_nodes_xpath(&html_search, "//div[class='chapter-list']//a", + [](QuickMediaMatchNode *node, void *userdata) { + auto *item_data = (BodyItems*)userdata; + QuickMediaStringView href = quickmedia_html_node_get_attribute_value(node, "href"); + QuickMediaStringView text = quickmedia_html_node_get_text(node); + if(href.data && text.data) { + auto item = BodyItem::create(std::string(text.data, text.size)); + item->url.assign(href.data, href.size); + item_data->push_back(std::move(item)); + } + return 0; + }, &chapters_items); + BodyItemContext body_item_context; body_item_context.body_items = &chapters_items; body_item_context.index = 0; @@ -167,7 +180,7 @@ namespace QuickMedia { } SearchResult ManganeloSearchPage::search(const std::string &str, BodyItems &result_items) { - std::string url = "https://manganelo.com/getstorysearchjson"; + std::string url = "https://manganato.com/getstorysearchjson"; std::string search_term = "searchword="; search_term += url_param_encode(str); CommandArg data_arg = { "--data-raw", std::move(search_term) }; |