Added logic to remove supported languages that are no longer supported, rather than just being purely additive. Added ApiClient logging.
This commit is contained in:
@@ -439,6 +439,14 @@ public class VoiceWorkUpdater(AppDbContext dbContext, ITimeProvider timeProvider
|
||||
dbContext.VoiceWorkSupportedLanguages.Add(voiceWorkSupportedLanguage);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string existingLinkCode in existingLanguageLinks.Keys)
|
||||
{
|
||||
if (!ingest.SupportedLanguages.Any(x => x.Code == existingLinkCode))
|
||||
{
|
||||
dbContext.VoiceWorkSupportedLanguages.Remove(existingLanguageLinks[existingLinkCode]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpsertSeries(VoiceWorkIngest ingest, VoiceWorkUpsertContext upsertContext)
|
||||
|
||||
Reference in New Issue
Block a user