* fix software decoder pipeline bugs * tweak nvidia scaling logic * update changelog * update dependencies
29 lines
1.0 KiB
C#
29 lines
1.0 KiB
C#
using ErsatzTV.Core.Interfaces.Metadata;
|
|
using ErsatzTV.Core.Interfaces.Repositories.Caching;
|
|
using ErsatzTV.Core.Interfaces.Search;
|
|
|
|
namespace ErsatzTV.Application.Search;
|
|
|
|
public class ReindexMediaItemsHandler : IRequestHandler<ReindexMediaItems>
|
|
{
|
|
private readonly ICachingSearchRepository _cachingSearchRepository;
|
|
private readonly IFallbackMetadataProvider _fallbackMetadataProvider;
|
|
private readonly ISearchIndex _searchIndex;
|
|
|
|
public ReindexMediaItemsHandler(
|
|
ICachingSearchRepository cachingSearchRepository,
|
|
IFallbackMetadataProvider fallbackMetadataProvider,
|
|
ISearchIndex searchIndex)
|
|
{
|
|
_cachingSearchRepository = cachingSearchRepository;
|
|
_fallbackMetadataProvider = fallbackMetadataProvider;
|
|
_searchIndex = searchIndex;
|
|
}
|
|
|
|
public async Task Handle(ReindexMediaItems request, CancellationToken cancellationToken)
|
|
{
|
|
await _searchIndex.RebuildItems(_cachingSearchRepository, _fallbackMetadataProvider, request.MediaItemIds);
|
|
_searchIndex.Commit();
|
|
}
|
|
}
|