Unwrapped GetDirectoryName and DirectorySeperatorChar

This commit is contained in:
Erwin de Haan
2019-01-26 21:47:11 +01:00
parent a05d803d4c
commit 3a831994f6
73 changed files with 119 additions and 114 deletions

View File

@@ -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();
}

View File

@@ -87,7 +87,7 @@ namespace MediaBrowser.Controller.Entities
return new[] {
new FileSystemMetadata
{
FullName = FileSystem.GetDirectoryName(Path),
FullName = System.IO.Path.GetDirectoryName(Path),
IsDirectory = true
}
};

View File

@@ -97,7 +97,7 @@ namespace MediaBrowser.Controller.Entities.TV
return series.Path;
}
return FileSystem.GetDirectoryName(Path);
return System.IO.Path.GetDirectoryName(Path);
}
}

View File

@@ -345,7 +345,7 @@ namespace MediaBrowser.Controller.Entities
{
if (IsStacked)
{
return FileSystem.GetDirectoryName(Path);
return System.IO.Path.GetDirectoryName(Path);
}
if (!IsPlaceHolder)

View File

@@ -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);

View File

@@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.Playlists
if (IsPlaylistFile(path))
{
return FileSystem.GetDirectoryName(path);
return System.IO.Path.GetDirectoryName(path);
}
return path;