using ErsatzTV.Core; namespace ErsatzTV.Application.Plex; public interface ISynchronizePlexLibraryById : IRequest>, IScannerBackgroundServiceRequest { int PlexLibraryId { get; } bool ForceScan { get; } bool DeepScan { get; } // When false, the ScannerService keeps the library lock held after this message so a later // message in the same batch (e.g. SynchronizePlexNetworks) carries the single release. bool Unlock { get; } } public record SynchronizePlexLibraryByIdIfNeeded(int PlexLibraryId, bool Unlock = true) : ISynchronizePlexLibraryById { public bool ForceScan => false; public bool DeepScan => false; } public record ForceSynchronizePlexLibraryById(int PlexLibraryId, bool DeepScan, bool Unlock = true) : ISynchronizePlexLibraryById { public bool ForceScan => true; }