diff --git a/API/Controllers/ChapterController.cs b/API/Controllers/ChapterController.cs index ef97f8c07..94535d499 100644 --- a/API/Controllers/ChapterController.cs +++ b/API/Controllers/ChapterController.cs @@ -338,7 +338,8 @@ public class ChapterController : BaseApiController _unitOfWork ); - // TODO: If changes; remove ChapterPublisher from KPlusOverrides + // TODO: Only remove field if changes were made + chapter.KPlusOverrides.Remove(MetadataSettingField.ChapterPublisher); // Update publishers await PersonHelper.UpdateChapterPeopleAsync( chapter, diff --git a/API/Services/Plus/ExternalMetadataService.cs b/API/Services/Plus/ExternalMetadataService.cs index 97a10749f..812ef510b 100644 --- a/API/Services/Plus/ExternalMetadataService.cs +++ b/API/Services/Plus/ExternalMetadataService.cs @@ -1131,8 +1131,10 @@ public class ExternalMetadataService : IExternalMetadataService madeModification = UpdateChapterTitle(chapter, settings, potentialMatch.Title, series.Name) || madeModification; madeModification = UpdateChapterSummary(chapter, settings, potentialMatch.Summary) || madeModification; madeModification = UpdateChapterReleaseDate(chapter, settings, potentialMatch.ReleaseDate) || madeModification; - // TODO: Update to set KPlusOverride - madeModification = await UpdateChapterPublisher(chapter, settings, potentialMatch.Publisher) || madeModification; + + var hasUpdatedPublisher = await UpdateChapterPublisher(chapter, settings, potentialMatch.Publisher); + if (hasUpdatedPublisher) chapter.AddKPlusOverride(MetadataSettingField.ChapterPublisher); + madeModification = hasUpdatedPublisher || madeModification; madeModification = await UpdateChapterPeople(chapter, settings, PersonRole.CoverArtist, potentialMatch.Artists) || madeModification; madeModification = await UpdateChapterPeople(chapter, settings, PersonRole.Writer, potentialMatch.Writers) || madeModification; @@ -1522,7 +1524,7 @@ public class ExternalMetadataService : IExternalMetadataService { try { - // Only choose a better image if we're overriding a user provided cover + // Only choose the better image if we're overriding a user provided cover await _coverDbService.SetSeriesCoverByUrl(series, coverUrl, false, !series.Metadata.HasSetKPlusMetadata(MetadataSettingField.Covers)); } catch (Exception ex)