mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
Some minor code cleanups
This commit is contained in:
parent
016590529f
commit
670a53258e
@@ -10,8 +10,8 @@ namespace MediaBrowser.Controller.IO
|
||||
{
|
||||
public class DirectoryWatchers
|
||||
{
|
||||
private List<FileSystemWatcher> FileSystemWatchers = new List<FileSystemWatcher>();
|
||||
private Timer updateTimer = null;
|
||||
private readonly List<FileSystemWatcher> FileSystemWatchers = new List<FileSystemWatcher>();
|
||||
private Timer updateTimer;
|
||||
private List<string> affectedPaths = new List<string>();
|
||||
|
||||
private const int TimerDelayInSeconds = 5;
|
||||
@@ -107,10 +107,8 @@ namespace MediaBrowser.Controller.IO
|
||||
{
|
||||
return Kernel.Instance.ReloadRoot();
|
||||
}
|
||||
else
|
||||
{
|
||||
return Task.WhenAll(itemsToRefresh.Select(i => Kernel.Instance.ReloadItem(i)));
|
||||
}
|
||||
|
||||
return Task.WhenAll(itemsToRefresh.Select(i => Kernel.Instance.ReloadItem(i)));
|
||||
}
|
||||
|
||||
private BaseItem GetAffectedBaseItem(string path)
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace MediaBrowser.Controller.IO
|
||||
private static extern bool FindClose(IntPtr hFindFile);
|
||||
|
||||
private const char SpaceChar = ' ';
|
||||
private static char[] InvalidFileNameChars = Path.GetInvalidFileNameChars();
|
||||
private static readonly char[] InvalidFileNameChars = Path.GetInvalidFileNameChars();
|
||||
|
||||
/// <summary>
|
||||
/// Takes a filename and removes invalid characters
|
||||
|
||||
Reference in New Issue
Block a user