Fixed voice work updater bug. Added integration tests for voice work search updates (Japanese).
This commit is contained in:
@@ -35,6 +35,18 @@ public class VoiceWorkUpdater(AppDbContext dbContext, ITimeProvider timeProvider
|
||||
|
||||
await dbContext.SaveChangesAsync(cancellationToken);
|
||||
|
||||
foreach (VoiceWorkIngest ingest in ingests)
|
||||
{
|
||||
VoiceWorkUpsertResult result = upsertContext.Results[ingest.ProductId];
|
||||
|
||||
if (result.Status is VoiceWorkUpsertStatus.Skipped)
|
||||
continue;
|
||||
|
||||
VoiceWork voiceWork = upsertContext.VoiceWorks[ingest.ProductId];
|
||||
|
||||
result.VoiceWorkId = voiceWork.VoiceWorkId;
|
||||
}
|
||||
|
||||
return [.. upsertContext.Results.Select(x => x.Value)];
|
||||
}
|
||||
|
||||
|
||||
13
JSMR.Infrastructure/Ingestion/VoiceWorkUpdaterRepository.cs
Normal file
13
JSMR.Infrastructure/Ingestion/VoiceWorkUpdaterRepository.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using JSMR.Application.Enums;
|
||||
using JSMR.Application.Scanning.Ports;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace JSMR.Infrastructure.Ingestion;
|
||||
|
||||
public class VoiceWorkUpdaterRepository(IServiceProvider serviceProvider) : IVoiceWorkUpdaterRepository
|
||||
{
|
||||
public IVoiceWorkUpdater? GetUpdater(Locale locale)
|
||||
{
|
||||
return serviceProvider.GetKeyedService<IVoiceWorkUpdater>(locale);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user