From 0e789fd6d897acb1e58aeb6a7dc0466227beb8ca Mon Sep 17 00:00:00 2001 From: Jason Dove Date: Sat, 30 Oct 2021 11:57:50 -0500 Subject: [PATCH] update dependencies and fix languageext deprecation warnings (#460) --- .../Commands/UpdateLibraryRefreshIntervalHandler.cs | 2 +- .../Commands/UpdatePlayoutDaysToBuildHandler.cs | 2 +- .../Emby/Commands/SynchronizeEmbyLibrariesHandler.cs | 2 +- .../Emby/Commands/SynchronizeEmbyLibraryByIdHandler.cs | 2 +- .../HDHR/Commands/UpdateHDHRTunerCountHandler.cs | 2 +- .../Commands/SynchronizeJellyfinAdminUserIdHandler.cs | 2 +- .../Commands/SynchronizeJellyfinLibrariesHandler.cs | 2 +- .../Commands/SynchronizeJellyfinLibraryByIdHandler.cs | 2 +- .../Commands/CreateLocalLibraryPathHandler.cs | 2 +- .../Libraries/Commands/LocalLibraryHandlerBase.cs | 2 +- .../Commands/CreateCollectionHandler.cs | 2 +- .../Commands/CreateMultiCollectionHandler.cs | 2 +- .../Commands/CreateSmartCollectionHandler.cs | 2 +- .../Commands/UpdateMultiCollectionHandler.cs | 2 +- .../Commands/CreateProgramScheduleHandler.cs | 2 +- .../Streaming/Commands/StartFFmpegSessionHandler.cs | 2 +- .../GetPlayoutItemProcessByChannelNumberHandler.cs | 4 ++-- ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj | 6 +++--- ErsatzTV.Core/ErsatzTV.Core.csproj | 2 +- ErsatzTV.Core/Scheduling/PlayoutBuilder.cs | 2 +- ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj | 10 +++++----- ErsatzTV.Infrastructure/Health/HealthCheckService.cs | 2 +- ErsatzTV/ErsatzTV.csproj | 8 ++++---- 23 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ErsatzTV.Application/Configuration/Commands/UpdateLibraryRefreshIntervalHandler.cs b/ErsatzTV.Application/Configuration/Commands/UpdateLibraryRefreshIntervalHandler.cs index 43043bb50..6e232d98c 100644 --- a/ErsatzTV.Application/Configuration/Commands/UpdateLibraryRefreshIntervalHandler.cs +++ b/ErsatzTV.Application/Configuration/Commands/UpdateLibraryRefreshIntervalHandler.cs @@ -25,7 +25,7 @@ namespace ErsatzTV.Application.Configuration.Commands private static Task> Validate(UpdateLibraryRefreshInterval request) => Optional(request.LibraryRefreshInterval) - .Filter(lri => lri > 0) + .Where(lri => lri > 0) .Map(_ => Unit.Default) .ToValidation("Tuner count must be greater than zero") .AsTask(); diff --git a/ErsatzTV.Application/Configuration/Commands/UpdatePlayoutDaysToBuildHandler.cs b/ErsatzTV.Application/Configuration/Commands/UpdatePlayoutDaysToBuildHandler.cs index f69631bf2..c8a5b90ad 100644 --- a/ErsatzTV.Application/Configuration/Commands/UpdatePlayoutDaysToBuildHandler.cs +++ b/ErsatzTV.Application/Configuration/Commands/UpdatePlayoutDaysToBuildHandler.cs @@ -58,7 +58,7 @@ namespace ErsatzTV.Application.Configuration.Commands private static Task> Validate(UpdatePlayoutDaysToBuild request) => Optional(request.DaysToBuild) - .Filter(days => days > 0) + .Where(days => days > 0) .Map(_ => Unit.Default) .ToValidation("Days to build must be greater than zero") .AsTask(); diff --git a/ErsatzTV.Application/Emby/Commands/SynchronizeEmbyLibrariesHandler.cs b/ErsatzTV.Application/Emby/Commands/SynchronizeEmbyLibrariesHandler.cs index e37fc3d38..f45065233 100644 --- a/ErsatzTV.Application/Emby/Commands/SynchronizeEmbyLibrariesHandler.cs +++ b/ErsatzTV.Application/Emby/Commands/SynchronizeEmbyLibrariesHandler.cs @@ -67,7 +67,7 @@ namespace ErsatzTV.Application.Emby.Commands { EmbySecrets secrets = await _embySecretStore.ReadSecrets(); return Optional(secrets.Address == connectionParameters.ActiveConnection.Address) - .Filter(match => match) + .Where(match => match) .Map(_ => connectionParameters with { ApiKey = secrets.ApiKey }) .ToValidation("Emby media source requires an api key"); } diff --git a/ErsatzTV.Application/Emby/Commands/SynchronizeEmbyLibraryByIdHandler.cs b/ErsatzTV.Application/Emby/Commands/SynchronizeEmbyLibraryByIdHandler.cs index 15746e238..36fd9cde7 100644 --- a/ErsatzTV.Application/Emby/Commands/SynchronizeEmbyLibraryByIdHandler.cs +++ b/ErsatzTV.Application/Emby/Commands/SynchronizeEmbyLibraryByIdHandler.cs @@ -142,7 +142,7 @@ namespace ErsatzTV.Application.Emby.Commands { EmbySecrets secrets = await _embySecretStore.ReadSecrets(); return Optional(secrets.Address == connectionParameters.ActiveConnection.Address) - .Filter(match => match) + .Where(match => match) .Map(_ => connectionParameters with { ApiKey = secrets.ApiKey }) .ToValidation("Emby media source requires an api key"); } diff --git a/ErsatzTV.Application/HDHR/Commands/UpdateHDHRTunerCountHandler.cs b/ErsatzTV.Application/HDHR/Commands/UpdateHDHRTunerCountHandler.cs index 4a04233c5..6c31ae15e 100644 --- a/ErsatzTV.Application/HDHR/Commands/UpdateHDHRTunerCountHandler.cs +++ b/ErsatzTV.Application/HDHR/Commands/UpdateHDHRTunerCountHandler.cs @@ -24,7 +24,7 @@ namespace ErsatzTV.Application.HDHR.Commands private static Task> Validate(UpdateHDHRTunerCount request) => Optional(request.TunerCount) - .Filter(tc => tc > 0) + .Where(tc => tc > 0) .Map(_ => Unit.Default) .ToValidation("Tuner count must be greater than zero") .AsTask(); diff --git a/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinAdminUserIdHandler.cs b/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinAdminUserIdHandler.cs index 269031372..fc30c131f 100644 --- a/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinAdminUserIdHandler.cs +++ b/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinAdminUserIdHandler.cs @@ -97,7 +97,7 @@ namespace ErsatzTV.Application.Jellyfin.Commands { JellyfinSecrets secrets = await _jellyfinSecretStore.ReadSecrets(); return Optional(secrets.Address == connectionParameters.ActiveConnection.Address) - .Filter(match => match) + .Where(match => match) .Map(_ => connectionParameters with { ApiKey = secrets.ApiKey }) .ToValidation("Jellyfin media source requires an api key"); } diff --git a/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinLibrariesHandler.cs b/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinLibrariesHandler.cs index 1569faad3..439250a4f 100644 --- a/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinLibrariesHandler.cs +++ b/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinLibrariesHandler.cs @@ -69,7 +69,7 @@ namespace ErsatzTV.Application.Jellyfin.Commands { JellyfinSecrets secrets = await _jellyfinSecretStore.ReadSecrets(); return Optional(secrets.Address == connectionParameters.ActiveConnection.Address) - .Filter(match => match) + .Where(match => match) .Map(_ => connectionParameters with { ApiKey = secrets.ApiKey }) .ToValidation("Jellyfin media source requires an api key"); } diff --git a/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinLibraryByIdHandler.cs b/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinLibraryByIdHandler.cs index ce07effc1..25d8abc18 100644 --- a/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinLibraryByIdHandler.cs +++ b/ErsatzTV.Application/Jellyfin/Commands/SynchronizeJellyfinLibraryByIdHandler.cs @@ -142,7 +142,7 @@ namespace ErsatzTV.Application.Jellyfin.Commands { JellyfinSecrets secrets = await _jellyfinSecretStore.ReadSecrets(); return Optional(secrets.Address == connectionParameters.ActiveConnection.Address) - .Filter(match => match) + .Where(match => match) .Map(_ => connectionParameters with { ApiKey = secrets.ApiKey }) .ToValidation("Jellyfin media source requires an api key"); } diff --git a/ErsatzTV.Application/Libraries/Commands/CreateLocalLibraryPathHandler.cs b/ErsatzTV.Application/Libraries/Commands/CreateLocalLibraryPathHandler.cs index 08215769b..2cd3903dd 100644 --- a/ErsatzTV.Application/Libraries/Commands/CreateLocalLibraryPathHandler.cs +++ b/ErsatzTV.Application/Libraries/Commands/CreateLocalLibraryPathHandler.cs @@ -46,7 +46,7 @@ namespace ErsatzTV.Application.Libraries.Commands .Map(list => list.Map(c => c.Path).ToList()); return Optional(request.Path) - .Filter(folder => allPaths.ForAll(f => !AreSubPaths(f, folder))) + .Where(folder => allPaths.ForAll(f => !AreSubPaths(f, folder))) .ToValidation("Path must not belong to another library path"); } diff --git a/ErsatzTV.Application/Libraries/Commands/LocalLibraryHandlerBase.cs b/ErsatzTV.Application/Libraries/Commands/LocalLibraryHandlerBase.cs index b6a343b07..82d22acec 100644 --- a/ErsatzTV.Application/Libraries/Commands/LocalLibraryHandlerBase.cs +++ b/ErsatzTV.Application/Libraries/Commands/LocalLibraryHandlerBase.cs @@ -33,7 +33,7 @@ namespace ErsatzTV.Application.Libraries.Commands .Map(list => list.SelectMany(ll => ll.Paths).Map(lp => lp.Path).ToList()); return Optional(localLibrary.Paths.Count(folder => allPaths.Any(f => AreSubPaths(f, folder.Path)))) - .Filter(length => length == 0) + .Where(length => length == 0) .Map(_ => localLibrary) .ToValidation("Path must not belong to another library path"); } diff --git a/ErsatzTV.Application/MediaCollections/Commands/CreateCollectionHandler.cs b/ErsatzTV.Application/MediaCollections/Commands/CreateCollectionHandler.cs index 0f02b7dcc..e64068714 100644 --- a/ErsatzTV.Application/MediaCollections/Commands/CreateCollectionHandler.cs +++ b/ErsatzTV.Application/MediaCollections/Commands/CreateCollectionHandler.cs @@ -60,7 +60,7 @@ namespace ErsatzTV.Application.MediaCollections.Commands .Bind(_ => createCollection.NotLongerThan(50)(c => c.Name)); var result2 = Optional(createCollection.Name) - .Filter(name => !allNames.Contains(name)) + .Where(name => !allNames.Contains(name)) .ToValidation("Collection name must be unique"); return (result1, result2).Apply((_, _) => createCollection.Name); diff --git a/ErsatzTV.Application/MediaCollections/Commands/CreateMultiCollectionHandler.cs b/ErsatzTV.Application/MediaCollections/Commands/CreateMultiCollectionHandler.cs index dcd27d952..4b8a8c81f 100644 --- a/ErsatzTV.Application/MediaCollections/Commands/CreateMultiCollectionHandler.cs +++ b/ErsatzTV.Application/MediaCollections/Commands/CreateMultiCollectionHandler.cs @@ -104,7 +104,7 @@ namespace ErsatzTV.Application.MediaCollections.Commands .Bind(_ => createMultiCollection.NotLongerThan(50)(c => c.Name)); var result2 = Optional(createMultiCollection.Name) - .Filter(name => !allNames.Contains(name)) + .Where(name => !allNames.Contains(name)) .ToValidation("MultiCollection name must be unique"); return (result1, result2).Apply((_, _) => createMultiCollection.Name); diff --git a/ErsatzTV.Application/MediaCollections/Commands/CreateSmartCollectionHandler.cs b/ErsatzTV.Application/MediaCollections/Commands/CreateSmartCollectionHandler.cs index 747d558c3..5177d6e69 100644 --- a/ErsatzTV.Application/MediaCollections/Commands/CreateSmartCollectionHandler.cs +++ b/ErsatzTV.Application/MediaCollections/Commands/CreateSmartCollectionHandler.cs @@ -61,7 +61,7 @@ namespace ErsatzTV.Application.MediaCollections.Commands .Bind(_ => createSmartCollection.NotLongerThan(50)(c => c.Name)); var result2 = Optional(createSmartCollection.Name) - .Filter(name => !allNames.Contains(name)) + .Where(name => !allNames.Contains(name)) .ToValidation("SmartCollection name must be unique"); return (result1, result2).Apply((_, _) => createSmartCollection.Name); diff --git a/ErsatzTV.Application/MediaCollections/Commands/UpdateMultiCollectionHandler.cs b/ErsatzTV.Application/MediaCollections/Commands/UpdateMultiCollectionHandler.cs index b7cf8d27c..36c6cdb0a 100644 --- a/ErsatzTV.Application/MediaCollections/Commands/UpdateMultiCollectionHandler.cs +++ b/ErsatzTV.Application/MediaCollections/Commands/UpdateMultiCollectionHandler.cs @@ -156,7 +156,7 @@ namespace ErsatzTV.Application.MediaCollections.Commands .Bind(_ => updateMultiCollection.NotLongerThan(50)(c => c.Name)); var result2 = Optional(updateMultiCollection.Name) - .Filter(name => !allNames.Contains(name)) + .Where(name => !allNames.Contains(name)) .ToValidation("MultiCollection name must be unique"); return (result1, result2).Apply((_, _) => updateMultiCollection.Name); diff --git a/ErsatzTV.Application/ProgramSchedules/Commands/CreateProgramScheduleHandler.cs b/ErsatzTV.Application/ProgramSchedules/Commands/CreateProgramScheduleHandler.cs index 3bee7e555..565c99d8e 100644 --- a/ErsatzTV.Application/ProgramSchedules/Commands/CreateProgramScheduleHandler.cs +++ b/ErsatzTV.Application/ProgramSchedules/Commands/CreateProgramScheduleHandler.cs @@ -65,7 +65,7 @@ namespace ErsatzTV.Application.ProgramSchedules.Commands .CountAsync(ps => ps.Name == createProgramSchedule.Name); var result2 = Optional(duplicateNameCount) - .Filter(count => count == 0) + .Where(count => count == 0) .ToValidation("Schedule name must be unique"); return (result1, result2).Apply((_, _) => createProgramSchedule.Name); diff --git a/ErsatzTV.Application/Streaming/Commands/StartFFmpegSessionHandler.cs b/ErsatzTV.Application/Streaming/Commands/StartFFmpegSessionHandler.cs index c398d7aca..c318b443f 100644 --- a/ErsatzTV.Application/Streaming/Commands/StartFFmpegSessionHandler.cs +++ b/ErsatzTV.Application/Streaming/Commands/StartFFmpegSessionHandler.cs @@ -83,7 +83,7 @@ namespace ErsatzTV.Application.Streaming.Commands private Task> SessionMustBeInactive(StartFFmpegSession request) { var result = Optional(_ffmpegSegmenterService.SessionWorkers.TryAdd(request.ChannelNumber, null)) - .Filter(success => success) + .Where(success => success) .Map(_ => Unit.Default) .ToValidation(new ChannelSessionAlreadyActive()); diff --git a/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs b/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs index bdbcd7f33..be2b74e1f 100644 --- a/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs +++ b/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs @@ -152,7 +152,7 @@ namespace ErsatzTV.Application.Streaming.Queries $"offline image is unavailable because transcoding is disabled in ffmpeg profile '{channel.FFmpegProfile.Name}'"; Option maybeDuration = await Optional(channel.FFmpegProfile.Transcode) - .Filter(transcode => transcode) + .Where(transcode => transcode) .Match( _ => dbContext.PlayoutItems .Filter(pi => pi.Playout.ChannelId == channel.Id) @@ -260,7 +260,7 @@ namespace ErsatzTV.Application.Streaming.Queries MediaItem item = items[new Random().Next(items.Count)]; Option maybeDuration = await Optional(channel.FFmpegProfile.Transcode) - .Filter(transcode => transcode) + .Where(transcode => transcode) .Match( _ => dbContext.PlayoutItems .Filter(pi => pi.Playout.ChannelId == channel.Id) diff --git a/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj b/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj index 01fda11e5..98682603f 100644 --- a/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj +++ b/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj @@ -6,10 +6,10 @@ - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ErsatzTV.Core/ErsatzTV.Core.csproj b/ErsatzTV.Core/ErsatzTV.Core.csproj index 0900a1029..a7f42cd80 100644 --- a/ErsatzTV.Core/ErsatzTV.Core.csproj +++ b/ErsatzTV.Core/ErsatzTV.Core.csproj @@ -8,7 +8,7 @@ - + diff --git a/ErsatzTV.Core/Scheduling/PlayoutBuilder.cs b/ErsatzTV.Core/Scheduling/PlayoutBuilder.cs index 491f2dbe8..a75294165 100644 --- a/ErsatzTV.Core/Scheduling/PlayoutBuilder.cs +++ b/ErsatzTV.Core/Scheduling/PlayoutBuilder.cs @@ -243,7 +243,7 @@ namespace ErsatzTV.Core.Scheduling _mediaCollectionRepository, _televisionRepository, _artistRepository, - collectionKey))).Sequence(); + collectionKey))).SequenceParallel(); return Map.createRange(tuples); } diff --git a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj index 386690571..dd196e129 100644 --- a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj +++ b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj @@ -9,9 +9,9 @@ - - - + + + all @@ -22,8 +22,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/ErsatzTV.Infrastructure/Health/HealthCheckService.cs b/ErsatzTV.Infrastructure/Health/HealthCheckService.cs index daaef72d4..dc0ae615b 100644 --- a/ErsatzTV.Infrastructure/Health/HealthCheckService.cs +++ b/ErsatzTV.Infrastructure/Health/HealthCheckService.cs @@ -34,6 +34,6 @@ namespace ErsatzTV.Infrastructure.Health } public Task> PerformHealthChecks() => - _checks.Map(c => c.Check()).Sequence().Map(results => results.ToList()); + _checks.Map(c => c.Check()).SequenceParallel().Map(results => results.ToList()); } } diff --git a/ErsatzTV/ErsatzTV.csproj b/ErsatzTV/ErsatzTV.csproj index c54882371..252692344 100644 --- a/ErsatzTV/ErsatzTV.csproj +++ b/ErsatzTV/ErsatzTV.csproj @@ -14,10 +14,10 @@ - - + + - + @@ -33,7 +33,7 @@ - +