From ecb76941fe38cb8016388f6b2185312432cc8122 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 6 May 2021 18:46:28 +0200 Subject: Upgrade mangadex api to the new one There is a bug in mangadex api where order[publishAt]=desc is ignored, so going to the next chapter is messed up. Automedia will be updated after this is fixed. Also manga cover images are missing. --- src/DownloadUtils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/DownloadUtils.cpp') diff --git a/src/DownloadUtils.cpp b/src/DownloadUtils.cpp index c773ce6..4afba38 100644 --- a/src/DownloadUtils.cpp +++ b/src/DownloadUtils.cpp @@ -22,7 +22,7 @@ namespace QuickMedia { DownloadResult download_head_to_string(const std::string &url, std::string &result, bool use_browser_useragent, bool fail_on_error) { sf::Clock timer; std::vector args; - args.insert(args.end(), { "curl", "-I", "-H", "Accept-Language: en-US,en;q=0.5", "-H", "Connection: keep-alive", "--compressed", "-s" }); + args.insert(args.end(), { "curl", "-I", "-g", "-H", "Accept-Language: en-US,en;q=0.5", "-H", "Connection: keep-alive", "--compressed", "-s" }); if(fail_on_error) args.push_back("-f"); if(use_browser_useragent) { @@ -49,7 +49,7 @@ namespace QuickMedia { DownloadResult download_to_string(const std::string &url, std::string &result, const std::vector &additional_args, bool use_browser_useragent, bool fail_on_error) { sf::Clock timer; std::vector args; - args.insert(args.end(), { "curl", "-H", "Accept-Language: en-US,en;q=0.5", "-H", "Connection: keep-alive", "--compressed", "-s", "-L" }); + args.insert(args.end(), { "curl", "-H", "Accept-Language: en-US,en;q=0.5", "-H", "Connection: keep-alive", "--compressed", "-g", "-s", "-L" }); if(fail_on_error) args.push_back("-f"); for(const CommandArg &arg : additional_args) { @@ -141,7 +141,7 @@ namespace QuickMedia { DownloadResult download_to_json(const std::string &url, rapidjson::Document &result, const std::vector &additional_args, bool use_browser_useragent, bool fail_on_error) { sf::Clock timer; std::vector args; - args.insert(args.end(), { "curl", "-H", "Accept-Language: en-US,en;q=0.5", "-H", "Connection: keep-alive", "--compressed", "-s", "-L" }); + args.insert(args.end(), { "curl", "-H", "Accept-Language: en-US,en;q=0.5", "-H", "Connection: keep-alive", "--compressed", "-g", "-s", "-L" }); if(fail_on_error) args.push_back("-f"); for(const CommandArg &arg : additional_args) { -- cgit v1.2.3