work around sequential schedule validation limit (#2655)
* remove readalltext * remove unused method * remove fileexists * remove folderexists * remove readalllines * remove fake local file system * show playlist name in playout build errors * add basic sequential schedule validator tests * work around sequential schedule validation limit
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
using System.Collections.Immutable;
|
||||
using System.IO.Abstractions;
|
||||
using ErsatzTV.Core;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain.MediaServer;
|
||||
using ErsatzTV.Core.Errors;
|
||||
using ErsatzTV.Core.Extensions;
|
||||
using ErsatzTV.Core.Interfaces.Metadata;
|
||||
using ErsatzTV.Core.Interfaces.Repositories;
|
||||
using ErsatzTV.Core.Metadata;
|
||||
using ErsatzTV.Scanner.Core.Interfaces;
|
||||
@@ -21,19 +21,19 @@ public abstract class MediaServerOtherVideoLibraryScanner<TConnectionParameters,
|
||||
{
|
||||
private readonly ILocalChaptersProvider _localChaptersProvider;
|
||||
private readonly IScannerProxy _scannerProxy;
|
||||
private readonly ILocalFileSystem _localFileSystem;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ILogger _logger;
|
||||
private readonly IMetadataRepository _metadataRepository;
|
||||
|
||||
protected MediaServerOtherVideoLibraryScanner(
|
||||
IScannerProxy scannerProxy,
|
||||
ILocalFileSystem localFileSystem,
|
||||
IFileSystem fileSystem,
|
||||
ILocalChaptersProvider localChaptersProvider,
|
||||
IMetadataRepository metadataRepository,
|
||||
ILogger logger)
|
||||
{
|
||||
_scannerProxy = scannerProxy;
|
||||
_localFileSystem = localFileSystem;
|
||||
_fileSystem = fileSystem;
|
||||
_localChaptersProvider = localChaptersProvider;
|
||||
_metadataRepository = metadataRepository;
|
||||
_logger = logger;
|
||||
@@ -174,7 +174,7 @@ public abstract class MediaServerOtherVideoLibraryScanner<TConnectionParameters,
|
||||
{
|
||||
await otherVideoRepository.SetEtag(result.Item, MediaServerEtag(incoming));
|
||||
|
||||
if (_localFileSystem.FileExists(result.LocalPath))
|
||||
if (_fileSystem.File.Exists(result.LocalPath))
|
||||
{
|
||||
Option<int> flagResult = await otherVideoRepository.FlagNormal(library, result.Item);
|
||||
if (flagResult.IsSome)
|
||||
@@ -277,7 +277,7 @@ public abstract class MediaServerOtherVideoLibraryScanner<TConnectionParameters,
|
||||
existingEtag == MediaServerEtag(incoming))
|
||||
{
|
||||
// skip scanning unavailable/file not found items that are unchanged and still don't exist locally
|
||||
if (!_localFileSystem.FileExists(localPath) && !ServerSupportsRemoteStreaming)
|
||||
if (!_fileSystem.File.Exists(localPath) && !ServerSupportsRemoteStreaming)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -286,7 +286,7 @@ public abstract class MediaServerOtherVideoLibraryScanner<TConnectionParameters,
|
||||
{
|
||||
// item is unchanged, but file does not exist
|
||||
// don't scan, but mark as unavailable
|
||||
if (!_localFileSystem.FileExists(localPath))
|
||||
if (!_fileSystem.File.Exists(localPath))
|
||||
{
|
||||
if (ServerSupportsRemoteStreaming)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user