aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels van Velzen <nielsvanvelzen@users.noreply.github.com>2024-09-07 19:22:31 +0200
committerGitHub <noreply@github.com>2024-09-07 11:22:31 -0600
commit675a8a9ec91da47e37ace6161ba5a5a0e20a7839 (patch)
tree61ca79c999ebde766ca852fbda1bfabfe3b68d9e
parentdf00909b85db0c312879df404049dd98508781d2 (diff)
Remove left-over network path references (#12446)
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs35
-rw-r--r--MediaBrowser.Model/Configuration/MediaPathInfo.cs2
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs2
3 files changed, 1 insertions, 38 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 48d24385e..28f7ed659 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -2725,33 +2725,9 @@ namespace Emby.Server.Implementations.Library
public string GetPathAfterNetworkSubstitution(string path, BaseItem? ownerItem)
{
- string? newPath;
- if (ownerItem is not null)
- {
- var libraryOptions = GetLibraryOptions(ownerItem);
- if (libraryOptions is not null)
- {
- foreach (var pathInfo in libraryOptions.PathInfos)
- {
- if (path.TryReplaceSubPath(pathInfo.Path, pathInfo.NetworkPath, out newPath))
- {
- return newPath;
- }
- }
- }
- }
-
- var metadataPath = _configurationManager.Configuration.MetadataPath;
- var metadataNetworkPath = _configurationManager.Configuration.MetadataNetworkPath;
-
- if (path.TryReplaceSubPath(metadataPath, metadataNetworkPath, out newPath))
- {
- return newPath;
- }
-
foreach (var map in _configurationManager.Configuration.PathSubstitutions)
{
- if (path.TryReplaceSubPath(map.From, map.To, out newPath))
+ if (path.TryReplaceSubPath(map.From, map.To, out var newPath))
{
return newPath;
}
@@ -3070,15 +3046,6 @@ namespace Emby.Server.Implementations.Library
SyncLibraryOptionsToLocations(virtualFolderPath, libraryOptions);
- foreach (var originalPathInfo in libraryOptions.PathInfos)
- {
- if (string.Equals(mediaPath.Path, originalPathInfo.Path, StringComparison.Ordinal))
- {
- originalPathInfo.NetworkPath = mediaPath.NetworkPath;
- break;
- }
- }
-
CollectionFolder.SaveLibraryOptions(virtualFolderPath, libraryOptions);
}
diff --git a/MediaBrowser.Model/Configuration/MediaPathInfo.cs b/MediaBrowser.Model/Configuration/MediaPathInfo.cs
index a7bc43590..25a5d5606 100644
--- a/MediaBrowser.Model/Configuration/MediaPathInfo.cs
+++ b/MediaBrowser.Model/Configuration/MediaPathInfo.cs
@@ -16,7 +16,5 @@ namespace MediaBrowser.Model.Configuration
}
public string Path { get; set; }
-
- public string? NetworkPath { get; set; }
}
}
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 52f7e53b8..5ad588200 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -96,8 +96,6 @@ public class ServerConfiguration : BaseApplicationConfiguration
/// <value>The metadata path.</value>
public string MetadataPath { get; set; } = string.Empty;
- public string MetadataNetworkPath { get; set; } = string.Empty;
-
/// <summary>
/// Gets or sets the preferred metadata language.
/// </summary>