2
0

Fix wrong jobtype

This commit is contained in:
glax 2023-11-05 16:14:23 +01:00
parent 1bcbd1517f
commit 5cdc7d7207

View File

@ -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();