aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-04-07 10:18:11 +0200
committerdec05eba <dec05eba@protonmail.com>2022-04-07 10:18:11 +0200
commitfe52a52f12d77a55373ad0fd26df49f525a7ef35 (patch)
tree2674f1529c084c3081ef168569a3d3dd498b5cef /src/QuickMedia.cpp
parentc1ee0d53ddfccd74112ac9db066e345861a7aea9 (diff)
Fix manganelo and readm: dont use wget, and fix cloudflare bypass download to file
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 101fa59..45c0bd1 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -3846,7 +3846,6 @@ namespace QuickMedia {
std::vector<CommandArg> extra_args;
const bool is_manganelo = (strcmp(images_page->get_service_name(), "manganelo") == 0);
const char *website_url = images_page->get_website_url();
- const bool cloudflare_bypass = (strcmp(images_page->get_service_name(), "manganelo") == 0 || strcmp(images_page->get_service_name(), "readm") == 0);
if(is_manganelo) {
extra_args = {
CommandArg { "-H", "accept: image/jpeg,image/png,image/*,*/*;q=0.8" },
@@ -3876,7 +3875,7 @@ namespace QuickMedia {
}
} else {
int64_t file_size = 0;
- if(download_to_file(url, image_filepath_tmp.data, extra_args, true, cloudflare_bypass) != DownloadResult::OK || (is_manganelo && file_get_size(image_filepath_tmp, &file_size) == 0 && file_size < 255)) {
+ if(download_to_file(url, image_filepath_tmp.data, extra_args, true) != DownloadResult::OK || (is_manganelo && file_get_size(image_filepath_tmp, &file_size) == 0 && file_size < 255)) {
if(!image_download_cancel) show_notification("QuickMedia", "Failed to download image: " + url, Urgency::CRITICAL);
return true;
}