mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
update directory service
This commit is contained in:
parent
24003580e7
commit
c3d8115bc8
@ -100,28 +100,29 @@ namespace MediaBrowser.Controller.Providers
|
|||||||
|
|
||||||
public FileSystemMetadata GetFile(string path)
|
public FileSystemMetadata GetFile(string path)
|
||||||
{
|
{
|
||||||
var directory = Path.GetDirectoryName(path);
|
return _fileSystem.GetFileInfo(path);
|
||||||
|
//var directory = Path.GetDirectoryName(path);
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(directory))
|
//if (string.IsNullOrWhiteSpace(directory))
|
||||||
{
|
//{
|
||||||
_logger.Debug("Parent path is null for {0}", path);
|
// _logger.Debug("Parent path is null for {0}", path);
|
||||||
return null;
|
// return null;
|
||||||
}
|
//}
|
||||||
|
|
||||||
try
|
//try
|
||||||
{
|
//{
|
||||||
var dict = GetFileSystemDictionary(directory, false);
|
// var dict = GetFileSystemDictionary(directory, false);
|
||||||
|
|
||||||
FileSystemMetadata entry;
|
// FileSystemMetadata entry;
|
||||||
dict.TryGetValue(path, out entry);
|
// dict.TryGetValue(path, out entry);
|
||||||
|
|
||||||
return entry;
|
// return entry;
|
||||||
}
|
//}
|
||||||
catch (Exception ex)
|
//catch (Exception ex)
|
||||||
{
|
//{
|
||||||
_logger.ErrorException("Error in GetFileSystemDictionary. Directory: :{0}. Original path: {1}", ex, directory, path);
|
// _logger.ErrorException("Error in GetFileSystemDictionary. Directory: :{0}. Original path: {1}", ex, directory, path);
|
||||||
return null;
|
// return null;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<FileSystemMetadata> GetDirectories(string path)
|
public IEnumerable<FileSystemMetadata> GetDirectories(string path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user