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.
31 lines
821 B
31 lines
821 B
using ErsatzTV.Core; |
|
using LanguageExt; |
|
using MediatR; |
|
|
|
namespace ErsatzTV.Application.MediaSources.Commands |
|
{ |
|
public interface IScanLocalLibrary : IRequest<Either<BaseError, string>>, IBackgroundServiceRequest |
|
{ |
|
int LibraryId { get; } |
|
bool ForceScan { get; } |
|
bool Rescan { get; } |
|
} |
|
|
|
public record ScanLocalLibraryIfNeeded(int LibraryId) : IScanLocalLibrary |
|
{ |
|
public bool ForceScan => false; |
|
public bool Rescan => false; |
|
} |
|
|
|
public record ForceScanLocalLibrary(int LibraryId) : IScanLocalLibrary |
|
{ |
|
public bool ForceScan => true; |
|
public bool Rescan => false; |
|
} |
|
|
|
public record ForceRescanLocalLibrary(int LibraryId) : IScanLocalLibrary |
|
{ |
|
public bool ForceScan => true; |
|
public bool Rescan => true; |
|
} |
|
}
|
|
|