Stream custom live channels using your own media
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.
 
 
 
 

14 lines
551 B

using ErsatzTV.Core;
using ErsatzTV.Core.Interfaces.Repositories;
namespace ErsatzTV.Application.Maintenance;
public class DeleteOrphanedArtworkHandler(IArtworkRepository artworkRepository)
: IRequestHandler<DeleteOrphanedArtwork, Either<BaseError, Unit>>
{
public Task<Either<BaseError, Unit>>
Handle(DeleteOrphanedArtwork request, CancellationToken cancellationToken) =>
artworkRepository.GetOrphanedArtworkIds()
.Bind(artworkRepository.Delete)
.Map(_ => Right<BaseError, Unit>(Unit.Default));
}