media source scan interval (#28)
* scan media sources once every six hours * cleanup * force scan from ui
This commit is contained in:
@@ -4,6 +4,19 @@ using MediatR;
|
||||
|
||||
namespace ErsatzTV.Application.MediaSources.Commands
|
||||
{
|
||||
public record ScanLocalMediaSource(int MediaSourceId) : IRequest<Either<BaseError, string>>,
|
||||
IBackgroundServiceRequest;
|
||||
public interface IScanLocalMediaSource : IRequest<Either<BaseError, string>>, IBackgroundServiceRequest
|
||||
{
|
||||
int MediaSourceId { get; }
|
||||
bool ForceScan { get; }
|
||||
}
|
||||
|
||||
public record ScanLocalMediaSourceIfNeeded(int MediaSourceId) : IScanLocalMediaSource
|
||||
{
|
||||
public bool ForceScan => false;
|
||||
}
|
||||
|
||||
public record ForceScanLocalMediaSource(int MediaSourceId) : IScanLocalMediaSource
|
||||
{
|
||||
public bool ForceScan => true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user