From 58cff6513aee85e6677edc79d5a06162a7018dda Mon Sep 17 00:00:00 2001 From: Glax Date: Thu, 25 Apr 2024 20:46:26 +0200 Subject: [PATCH] Possible fix #175 --- Tranga/Jobs/UpdateMetadata.cs | 1 + Tranga/Manga.cs | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Tranga/Jobs/UpdateMetadata.cs b/Tranga/Jobs/UpdateMetadata.cs index 5471685..b855f14 100644 --- a/Tranga/Jobs/UpdateMetadata.cs +++ b/Tranga/Jobs/UpdateMetadata.cs @@ -35,6 +35,7 @@ public class UpdateMetadata : Job this.manga = manga.WithMetadata(updatedManga); this.manga.SaveSeriesInfoJson(settings.downloadLocation, true); + this.mangaConnector.CopyCoverFromCacheToDownloadLocation(manga); this.progressToken.Complete(); } else diff --git a/Tranga/Manga.cs b/Tranga/Manga.cs index 388d02d..4e079c5 100644 --- a/Tranga/Manga.cs +++ b/Tranga/Manga.cs @@ -20,7 +20,7 @@ public struct Manga public string[] tags { get; private set; } // ReSharper disable once UnusedAutoPropertyAccessor.Global public string? coverUrl { get; private set; } - public string? coverFileNameInCache { get; } + public string? coverFileNameInCache { get; private set; } // ReSharper disable once UnusedAutoPropertyAccessor.Global public Dictionary links { get; } // ReSharper disable once MemberCanBePrivate.Global @@ -88,7 +88,8 @@ public struct Manga status = newManga.status, releaseStatus = newManga.releaseStatus, websiteUrl = newManga.websiteUrl, - year = newManga.year + year = newManga.year, + coverFileNameInCache = coverFileNameInCache }; } @@ -103,6 +104,7 @@ public struct Manga this.sortName == compareManga.sortName && this.latestChapterAvailable.Equals(compareManga.latestChapterAvailable) && this.authors.All(a => compareManga.authors.Contains(a)) && + (this.coverFileNameInCache??"").Equals(compareManga.coverFileNameInCache) && (this.websiteUrl??"").Equals(compareManga.websiteUrl) && this.tags.All(t => compareManga.tags.Contains(t)); }