From 5a41103e7d7f67e001926ab4741cfec0bcbe8526 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 17 Jan 2020 00:15:04 +0100 Subject: Draw header title and background over body --- src/plugins/Fourchan.cpp | 9 +++++++-- src/plugins/Manganelo.cpp | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/Fourchan.cpp b/src/plugins/Fourchan.cpp index 438dc3b..212e197 100644 --- a/src/plugins/Fourchan.cpp +++ b/src/plugins/Fourchan.cpp @@ -137,8 +137,13 @@ namespace QuickMedia { static void extract_comment_pieces(const char *html_source, size_t size, CommentPieceCallback callback) { TidyDoc doc = tidyCreate(); - for(int i = 0; i < N_TIDY_OPTIONS; ++i) - tidyOptSetBool(doc, (TidyOptionId)i, no); + TidyIterator it_opt = tidyGetOptionList(doc); + while (it_opt) { + TidyOption opt = tidyGetNextOption(doc, &it_opt); + if (tidyOptGetType(opt) == TidyBoolean) + tidyOptSetBool(doc, tidyOptGetId(opt), no); + } + tidyOptSetInt(doc, TidyWrapLen, 0); if(tidyParseString(doc, html_source) < 0) { CommentPiece comment_piece; comment_piece.type = CommentPiece::Type::TEXT; diff --git a/src/plugins/Manganelo.cpp b/src/plugins/Manganelo.cpp index 2b69e62..425bf4d 100644 --- a/src/plugins/Manganelo.cpp +++ b/src/plugins/Manganelo.cpp @@ -119,7 +119,7 @@ namespace QuickMedia { if(result != 0) goto cleanup; - result = quickmedia_html_find_nodes_xpath(&html_search, "//div[class='container-chapter-reader']//img", + result = quickmedia_html_find_nodes_xpath(&html_search, "//div[class='container-chapter-reader']/img", [](QuickMediaHtmlNode *node, void *userdata) { auto *urls = (std::vector*)userdata; const char *src = quickmedia_html_node_get_attribute_value(node, "src"); -- cgit v1.2.3