aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/LocalManga.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/LocalManga.cpp b/src/plugins/LocalManga.cpp
index dc98639..ed0f1b2 100644
--- a/src/plugins/LocalManga.cpp
+++ b/src/plugins/LocalManga.cpp
@@ -16,6 +16,11 @@ namespace QuickMedia {
public:
static CoverPageLinkCache& get_instance() {
static CoverPageLinkCache instance;
+ if(instance.initialized)
+ return instance;
+
+ instance.initialized = true;
+
Path dir = get_cache_dir().join("thumbnail-link");
if(create_directory_recursive(dir) != 0) {
show_notification("QuickMedia", "Failed to create directory: " + dir.data, Urgency::CRITICAL);
@@ -67,6 +72,7 @@ namespace QuickMedia {
private:
std::unordered_map<std::string, std::string> manga_name_base64_to_cover_filepath_map;
Path cache_filepath;
+ bool initialized = false;
};
static const mgl::Color finished_reading_color = mgl::Color(43, 255, 47);