mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-01 05:18:27 +01:00
Unwrapped GetDirectoryName and DirectorySeperatorChar
This commit is contained in:
@@ -228,7 +228,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return Path;
|
||||
}
|
||||
|
||||
return FileSystem.GetDirectoryName(Path);
|
||||
return System.IO.Path.GetDirectoryName(Path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2208,7 +2208,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var allFiles = ImageInfos
|
||||
.Where(i => i.IsLocalFile)
|
||||
.Select(i => FileSystem.GetDirectoryName(i.Path))
|
||||
.Select(i => System.IO.Path.GetDirectoryName(i.Path))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.SelectMany(i => directoryService.GetFilePaths(i))
|
||||
.ToList();
|
||||
@@ -2396,7 +2396,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
var extensions = new List<string> { ".nfo", ".xml", ".srt", ".vtt", ".sub", ".idx", ".txt", ".edl", ".bif", ".smi", ".ttml" };
|
||||
extensions.AddRange(SupportedImageExtensions);
|
||||
|
||||
return FileSystem.GetFiles(FileSystem.GetDirectoryName(Path), extensions.ToArray(), false, false)
|
||||
return FileSystem.GetFiles(System.IO.Path.GetDirectoryName(Path), extensions.ToArray(), false, false)
|
||||
.Where(i => System.IO.Path.GetFileNameWithoutExtension(i.FullName).StartsWith(filename, StringComparison.OrdinalIgnoreCase))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return new[] {
|
||||
new FileSystemMetadata
|
||||
{
|
||||
FullName = FileSystem.GetDirectoryName(Path),
|
||||
FullName = System.IO.Path.GetDirectoryName(Path),
|
||||
IsDirectory = true
|
||||
}
|
||||
};
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
return series.Path;
|
||||
}
|
||||
|
||||
return FileSystem.GetDirectoryName(Path);
|
||||
return System.IO.Path.GetDirectoryName(Path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
if (IsStacked)
|
||||
{
|
||||
return FileSystem.GetDirectoryName(Path);
|
||||
return System.IO.Path.GetDirectoryName(Path);
|
||||
}
|
||||
|
||||
if (!IsPlaceHolder)
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace MediaBrowser.Controller.Library
|
||||
return false;
|
||||
}
|
||||
|
||||
var parentDir = BaseItem.FileSystem.GetDirectoryName(Path) ?? string.Empty;
|
||||
var parentDir = System.IO.Path.GetDirectoryName(Path) ?? string.Empty;
|
||||
|
||||
return parentDir.Length > _appPaths.RootFolderPath.Length
|
||||
&& parentDir.StartsWith(_appPaths.RootFolderPath, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.Playlists
|
||||
|
||||
if (IsPlaylistFile(path))
|
||||
{
|
||||
return FileSystem.GetDirectoryName(path);
|
||||
return System.IO.Path.GetDirectoryName(path);
|
||||
}
|
||||
|
||||
return path;
|
||||
|
||||
Reference in New Issue
Block a user