mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
496 B
16 lines
496 B
using ErsatzTV.Core.Interfaces.Search; |
|
|
|
namespace ErsatzTV.Application.Search; |
|
|
|
public class RemoveMediaItemsHandler : IRequestHandler<RemoveMediaItems> |
|
{ |
|
private readonly ISearchIndex _searchIndex; |
|
|
|
public RemoveMediaItemsHandler(ISearchIndex searchIndex) => _searchIndex = searchIndex; |
|
|
|
public async Task Handle(RemoveMediaItems request, CancellationToken cancellationToken) |
|
{ |
|
await _searchIndex.RemoveItems(request.MediaItemIds); |
|
_searchIndex.Commit(); |
|
} |
|
}
|
|
|