aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-10-13 00:14:11 +0200
committerdec05eba <dec05eba@protonmail.com>2019-10-13 00:15:00 +0200
commitcc25c30cf177ee83d800925c72b7d334b76fb83d (patch)
treeea15e684648a425406f6fac25ef25e10c4142fdd /src
parenta3526002980b3ebc112ec6f272923a5196c072cd (diff)
Use image mirror 2 for manganelo
The first one can sometimes get stuck up to 20 seconds before it even starts download...
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp4
-rw-r--r--src/plugins/Manganelo.cpp8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 35bf9f7..bcd3efe 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -854,9 +854,9 @@ namespace QuickMedia {
bool resized = true;
sf::Event event;
- sf::Text chapter_text(chapter_title + std::string(" | Page ") + std::to_string(image_index + 1) + "/" + std::to_string(num_images), font, 14);
+ sf::Text chapter_text(chapter_title + " | Page " + std::to_string(image_index + 1) + "/" + std::to_string(num_images), font, 14);
if(image_index == num_images)
- chapter_text.setString("End");
+ chapter_text.setString(chapter_title + " | End");
chapter_text.setFillColor(sf::Color::White);
sf::RectangleShape chapter_text_background;
chapter_text_background.setFillColor(sf::Color(0, 0, 0, 150));
diff --git a/src/plugins/Manganelo.cpp b/src/plugins/Manganelo.cpp
index ec522d2..cd22cb0 100644
--- a/src/plugins/Manganelo.cpp
+++ b/src/plugins/Manganelo.cpp
@@ -144,8 +144,12 @@ namespace QuickMedia {
[](QuickMediaHtmlNode *node, void *userdata) {
auto *urls = (std::vector<std::string>*)userdata;
const char *src = quickmedia_html_node_get_attribute_value(node, "src");
- if(src)
- urls->push_back(src);
+ if(src) {
+ // TODO: If image loads too slow, try switching mirror
+ std::string image_url = src;
+ string_replace_all(image_url, "s3.mkklcdnv3.com", "bu.mkklcdnbuv1.com");
+ urls->emplace_back(std::move(image_url));
+ }
}, &last_chapter_image_urls);
cleanup: