From 5e8da591be9e57fe26bfb621d49145de2597ff06 Mon Sep 17 00:00:00 2001 From: Jason Dove Date: Sat, 2 Jul 2022 20:42:07 -0500 Subject: [PATCH] update dependencies (#883) * fix database initialization * update dependencies --- .../ErsatzTV.Core.Tests.csproj | 2 +- .../JellyfinPathReplacementServiceTests.cs | 32 +++++++++++++++++++ ErsatzTV.Core/ErsatzTV.Core.csproj | 4 +-- ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj | 2 +- ErsatzTV/ErsatzTV.csproj | 6 ++-- ErsatzTV/Startup.cs | 2 +- 6 files changed, 40 insertions(+), 8 deletions(-) diff --git a/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj b/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj index 824bd4c0c..dd1d5d185 100644 --- a/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj +++ b/ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/ErsatzTV.Core.Tests/Jellyfin/JellyfinPathReplacementServiceTests.cs b/ErsatzTV.Core.Tests/Jellyfin/JellyfinPathReplacementServiceTests.cs index c7dfed57f..d9ac99073 100644 --- a/ErsatzTV.Core.Tests/Jellyfin/JellyfinPathReplacementServiceTests.cs +++ b/ErsatzTV.Core.Tests/Jellyfin/JellyfinPathReplacementServiceTests.cs @@ -229,6 +229,38 @@ public class JellyfinPathReplacementServiceTests result.Should().Be(@"/mnt/something else/Some Shared Folder/Some Movie/Some Movie.mkv"); } + [Test] + public async Task JellyfinLinux_To_EtvLinux_UncPath() + { + var replacements = new List + { + new() + { + Id = 1, + JellyfinPath = @"\\192.168.1.100\Something\Some Shared Folder", + LocalPath = @"/mnt/something else/Some Shared Folder", + JellyfinMediaSource = new JellyfinMediaSource { OperatingSystem = "Linux" } + } + }; + + var repo = new Mock(); + repo.Setup(x => x.GetJellyfinPathReplacementsByLibraryId(It.IsAny())).Returns(replacements.AsTask()); + + var runtime = new Mock(); + runtime.Setup(x => x.IsOSPlatform(OSPlatform.Windows)).Returns(false); + + var service = new JellyfinPathReplacementService( + repo.Object, + runtime.Object, + new Mock>().Object); + + string result = await service.GetReplacementJellyfinPath( + 0, + @"\\192.168.1.100\Something\Some Shared Folder\Some Movie\Some Movie.mkv"); + + result.Should().Be(@"/mnt/something else/Some Shared Folder/Some Movie/Some Movie.mkv"); + } + [Test] public async Task Should_Not_Throw_For_Null_JellyfinPath() { diff --git a/ErsatzTV.Core/ErsatzTV.Core.csproj b/ErsatzTV.Core/ErsatzTV.Core.csproj index 32fbcae06..760d7d4e7 100644 --- a/ErsatzTV.Core/ErsatzTV.Core.csproj +++ b/ErsatzTV.Core/ErsatzTV.Core.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj b/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj index 30616e5e4..7bba13b36 100644 --- a/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj +++ b/ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj @@ -8,7 +8,7 @@ - + diff --git a/ErsatzTV/ErsatzTV.csproj b/ErsatzTV/ErsatzTV.csproj index b8248e883..aaeb0aac4 100644 --- a/ErsatzTV/ErsatzTV.csproj +++ b/ErsatzTV/ErsatzTV.csproj @@ -56,9 +56,9 @@ - + - + @@ -72,7 +72,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/ErsatzTV/Startup.cs b/ErsatzTV/Startup.cs index ad42d1c83..32aaf757a 100644 --- a/ErsatzTV/Startup.cs +++ b/ErsatzTV/Startup.cs @@ -427,9 +427,9 @@ public class Startup // services.AddTransient(typeof(IRequestHandler<,>), typeof(GetRecentLogEntriesHandler<>)); // run-once/blocking startup services - services.AddHostedService(); services.AddHostedService(); services.AddHostedService(); + services.AddHostedService(); services.AddHostedService(); services.AddHostedService(); services.AddHostedService();