From 34cdb1189d8a11fe1deb1189d86c5c77b33c7653 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 12 May 2021 19:49:54 +0200 Subject: Fix mangadex chapter order --- TODO | 3 +-- src/plugins/Mangadex.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 90369ec..f2d1ccc 100644 --- a/TODO +++ b/TODO @@ -10,7 +10,6 @@ Add support for special formatting for posts by admins on imageboards. For image boards, track (You)'s and show notification when somebody replies to your post. Go to next chapter when reaching the end of the chapter in image endless mode. Make code blocks on matrix and 4chan use monospace and have a background of a different color, also syntax coloring? -Add login page for mangadex instead of having to manually add remember_me token to config file. Allow deleting watch history with delete key (and show confirmation). Add navigation to nyaa.si submitter torrents. Create a large texture and add downloaded images to it. This will save memory usage because sfml has to use power of two textures (and so does opengl internally) for textures, so if you have multiple textures they will use more memory than one large texture with the same texture data. @@ -49,7 +48,7 @@ Add tabs. Using tabs with tabbed is not as good of a solution as it would use mu Remove related videos that have already been watched (except the first related video, which is the "watch next" video, usually the next part of a serie). Add F5 to refresh page. Allow choosing which translation/scanlation to use on mangadex. Right now it uses the latest one, which is most likely to be the best. -Retry download if it fails, at least 3 times (observed to be needed for mangadex images). +Retry download if it fails. Readd autocomplete, but make it better with a proper list. Also readd 4chan login page. Modify sfml to use GL_COMPRESSED_LUMINANCE and other texture compression modes (in sf::Texture). This reduces memory usage by half. Decrease memory usage even further (mostly in matrix /sync when part of large rooms) by using rapidjson SAX style API to stream json string into SAX style parsing. diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp index 0b50366..a402bb2 100644 --- a/src/plugins/Mangadex.cpp +++ b/src/plugins/Mangadex.cpp @@ -125,7 +125,7 @@ namespace QuickMedia { } static PluginResult get_chapters_for_manga(Page *page, const std::string &manga_id, int page_num, BodyItems &result_items) { - std::string request_url = "https://api.mangadex.org/chapter?manga=" + manga_id + "&limit=100&offset=" + std::to_string(page_num * 100) + "&order[publishAt]=desc"; + std::string request_url = "https://api.mangadex.org/manga/" + manga_id + "/feed?order[chapter]=desc&limit=100&locales[]=en&offset=" + std::to_string(page_num * 100); Json::Value json_root; if(page->download_json(json_root, request_url, {}, true) != DownloadResult::OK) -- cgit v1.2.3