aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/LocalManga.hpp1
-rw-r--r--src/plugins/LocalManga.cpp5
2 files changed, 5 insertions, 1 deletions
diff --git a/plugins/LocalManga.hpp b/plugins/LocalManga.hpp
index d327629..9113fc9 100644
--- a/plugins/LocalManga.hpp
+++ b/plugins/LocalManga.hpp
@@ -12,6 +12,7 @@ namespace QuickMedia {
struct LocalMangaChapter {
std::string name;
std::vector<LocalMangaPage> pages;
+ time_t modified_time_seconds;
};
struct LocalManga {
diff --git a/src/plugins/LocalManga.cpp b/src/plugins/LocalManga.cpp
index 3fc7269..3bb3c93 100644
--- a/src/plugins/LocalManga.cpp
+++ b/src/plugins/LocalManga.cpp
@@ -129,6 +129,9 @@ namespace QuickMedia {
}
}
+ if(!only_get_coverpage)
+ file_get_last_modified_time_seconds(filepath.data.c_str(), &local_manga_chapter.modified_time_seconds);
+
chapter_list.push_back(std::move(local_manga_chapter));
return only_include_latest ? false : true;
};
@@ -356,7 +359,7 @@ namespace QuickMedia {
for(const LocalMangaChapter &local_manga_chapter : chapters) {
auto body_item = BodyItem::create(local_manga_chapter.name);
body_item->url = local_manga_chapter.name;
- body_item->set_description("Updated " + seconds_to_relative_time_str(time_now - manga_it->modified_time_seconds));
+ body_item->set_description("Updated " + seconds_to_relative_time_str(time_now - local_manga_chapter.modified_time_seconds));
body_item->set_description_color(get_theme().faded_text_color);
chapters_items.push_back(std::move(body_item));
}