diff --git a/Tranga/Jobs/UpdateMetadata.cs b/Tranga/Jobs/UpdateMetadata.cs index 20efa1f..7cbd7af 100644 --- a/Tranga/Jobs/UpdateMetadata.cs +++ b/Tranga/Jobs/UpdateMetadata.cs @@ -32,11 +32,8 @@ public class UpdateMetadata : Job this.manga.UpdateMetadata(updatedManga); this.manga.SaveSeriesInfoJson(settings.downloadLocation, true); - if (parentJobId is not null) + if (parentJobId is not null && jobBoss.GetJobById(this.parentJobId) is DownloadNewChapters dncJob) { - - DownloadNewChapters dncJob = jobBoss.GetJobById(this.parentJobId) as DownloadNewChapters ?? - throw new Exception("Jobtype has to be DownloadNewChapters"); dncJob.manga = updatedManga; } this.progressToken.Complete();