From d14f96048d30b0f536f59b70bf999d4d6e9bb0d0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 16 Sep 2023 01:30:16 +0200 Subject: Update example config (and some other minor changes) --- src/plugins/LocalAnime.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/plugins/LocalAnime.cpp b/src/plugins/LocalAnime.cpp index 5e4c1d7..e5c8e81 100644 --- a/src/plugins/LocalAnime.cpp +++ b/src/plugins/LocalAnime.cpp @@ -90,7 +90,7 @@ namespace QuickMedia { static time_t update_modified_time_from_episodes(LocalAnimeItem &item) { if(std::holds_alternative(item)) { LocalAnime &anime = std::get(item); - time_t last_modified = 0; + time_t last_modified = anime.modified_time_seconds; for(LocalAnimeItem &item : anime.items) { last_modified = std::max(last_modified, update_modified_time_from_episodes(item)); @@ -100,7 +100,7 @@ namespace QuickMedia { return last_modified; } else if(std::holds_alternative(item)) { LocalAnimeSeason &season = std::get(item); - time_t last_modified = 0; + time_t last_modified = season.modified_time_seconds; for(LocalAnimeItem &item : season.episodes) { last_modified = std::max(last_modified, update_modified_time_from_episodes(item)); @@ -117,7 +117,7 @@ namespace QuickMedia { } static time_t update_modified_time_from_episodes(LocalAnime &anime) { - time_t last_modified = 0; + time_t last_modified = anime.modified_time_seconds; for(LocalAnimeItem &item : anime.items) { last_modified = std::max(last_modified, update_modified_time_from_episodes(item)); @@ -163,7 +163,7 @@ namespace QuickMedia { } } - for(auto anime_it : anime_by_name) { + for(auto &anime_it : anime_by_name) { GroupedAnime &grouped_anime = anime_it.second; for(auto season_it : grouped_anime.seasons_by_name) { LocalAnimeSeason &season = season_it.second; -- cgit v1.2.3