diff --git a/ErsatzTV.FFmpeg/Capabilities/Nvidia/NvEncSharpRedirector.cs b/ErsatzTV.FFmpeg/Capabilities/Nvidia/NvEncSharpRedirector.cs
index 67ea7c978..3baf4e045 100644
--- a/ErsatzTV.FFmpeg/Capabilities/Nvidia/NvEncSharpRedirector.cs
+++ b/ErsatzTV.FFmpeg/Capabilities/Nvidia/NvEncSharpRedirector.cs
@@ -7,14 +7,7 @@ public static class NvEncSharpRedirector
{
static NvEncSharpRedirector()
{
- try
- {
- NativeLibrary.SetDllImportResolver(typeof(Lennox.NvEncSharp.LibCuda).Assembly, Resolver);
- }
- catch (DllNotFoundException)
- {
- // do nothing
- }
+ NativeLibrary.SetDllImportResolver(typeof(Lennox.NvEncSharp.LibCuda).Assembly, Resolver);
}
private static IntPtr Resolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
diff --git a/ErsatzTV.Infrastructure.MySql/ErsatzTV.Infrastructure.MySql.csproj b/ErsatzTV.Infrastructure.MySql/ErsatzTV.Infrastructure.MySql.csproj
index 5815d774f..999c7f966 100644
--- a/ErsatzTV.Infrastructure.MySql/ErsatzTV.Infrastructure.MySql.csproj
+++ b/ErsatzTV.Infrastructure.MySql/ErsatzTV.Infrastructure.MySql.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/ErsatzTV.Infrastructure.Sqlite/ErsatzTV.Infrastructure.Sqlite.csproj b/ErsatzTV.Infrastructure.Sqlite/ErsatzTV.Infrastructure.Sqlite.csproj
index f1db3552c..8515412ce 100644
--- a/ErsatzTV.Infrastructure.Sqlite/ErsatzTV.Infrastructure.Sqlite.csproj
+++ b/ErsatzTV.Infrastructure.Sqlite/ErsatzTV.Infrastructure.Sqlite.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj
index 769363605..6bb166586 100644
--- a/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj
+++ b/ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/ErsatzTV/ErsatzTV.csproj b/ErsatzTV/ErsatzTV.csproj
index 19b190976..f59143075 100644
--- a/ErsatzTV/ErsatzTV.csproj
+++ b/ErsatzTV/ErsatzTV.csproj
@@ -57,7 +57,7 @@
-
+
diff --git a/ErsatzTV/Services/RunOnce/PlatformSettingsService.cs b/ErsatzTV/Services/RunOnce/PlatformSettingsService.cs
index 73992954f..cd1bd4745 100644
--- a/ErsatzTV/Services/RunOnce/PlatformSettingsService.cs
+++ b/ErsatzTV/Services/RunOnce/PlatformSettingsService.cs
@@ -17,7 +17,14 @@ public class PlatformSettingsService(IServiceScopeFactory serviceScopeFactory) :
IRuntimeInfo runtimeInfo = scope.ServiceProvider.GetRequiredService();
if (runtimeInfo != null && runtimeInfo.IsOSPlatform(OSPlatform.Linux))
{
- NvEncSharpRedirector.Init();
+ try
+ {
+ NvEncSharpRedirector.Init();
+ }
+ catch (DllNotFoundException)
+ {
+ // do nothing
+ }
if (Directory.Exists("/dev/dri"))
{