mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-31 21:08:27 +01:00
Merge remote-tracking branch 'jellyfinorigin/master' into feature/EFUserData
This commit is contained in:
@@ -50,6 +50,10 @@ namespace Emby.Server.Implementations.Library
|
||||
"**/lost+found/**",
|
||||
"**/lost+found",
|
||||
|
||||
// Trickplay files
|
||||
"**/*.trickplay",
|
||||
"**/*.trickplay/**",
|
||||
|
||||
// WMC temp recording directories that will constantly be written to
|
||||
"**/TempRec/**",
|
||||
"**/TempRec",
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user