mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 04:34:18 +01:00
Further reduced disk access in ItemController
This commit is contained in:
parent
0a0a4256b3
commit
9029d939f3
@@ -93,4 +93,28 @@ namespace MediaBrowser.Controller.IO
|
||||
}
|
||||
}
|
||||
|
||||
public struct LazyFileInfo
|
||||
{
|
||||
public string Path { get; set; }
|
||||
|
||||
private WIN32_FIND_DATA? _FileInfo { get; set; }
|
||||
|
||||
public WIN32_FIND_DATA FileInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_FileInfo == null)
|
||||
{
|
||||
_FileInfo = FileData.GetFileData(Path);
|
||||
}
|
||||
|
||||
return _FileInfo.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
_FileInfo = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user