aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Providers/DirectoryService.cs
diff options
context:
space:
mode:
authorTthecreator <epostvanthomas@kpnmail.nl>2019-01-22 15:22:42 +0000
committerGitHub <noreply@github.com>2019-01-22 15:22:42 +0000
commit189b99df16bd4c93cc96422d7282d01d9ff5b82f (patch)
tree26d7da95fe3e3b2772b8b39a2463a6c0ac7652fc /MediaBrowser.Controller/Providers/DirectoryService.cs
parenta00c0defa8cb22774f5dc8a7d566eb36ac7307e8 (diff)
parentedcfd8b565f632088c8b1f826db8e2fbecf9790d (diff)
Merge pull request #1 from jellyfin/dev
Update from jellyfin repo
Diffstat (limited to 'MediaBrowser.Controller/Providers/DirectoryService.cs')
-rw-r--r--MediaBrowser.Controller/Providers/DirectoryService.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs
index 9bb2f5bed..133e7c115 100644
--- a/MediaBrowser.Controller/Providers/DirectoryService.cs
+++ b/MediaBrowser.Controller/Providers/DirectoryService.cs
@@ -1,8 +1,8 @@
-using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using MediaBrowser.Model.IO;
+using Microsoft.Extensions.Logging;
namespace MediaBrowser.Controller.Providers
{
@@ -25,9 +25,7 @@ namespace MediaBrowser.Controller.Providers
public FileSystemMetadata[] GetFileSystemEntries(string path)
{
- FileSystemMetadata[] entries;
-
- if (!_cache.TryGetValue(path, out entries))
+ if (!_cache.TryGetValue(path, out FileSystemMetadata[] entries))
{
//_logger.LogDebug("Getting files for " + path);
@@ -56,8 +54,7 @@ namespace MediaBrowser.Controller.Providers
public FileSystemMetadata GetFile(string path)
{
- FileSystemMetadata file;
- if (!_fileCache.TryGetValue(path, out file))
+ if (!_fileCache.TryGetValue(path, out FileSystemMetadata file))
{
file = _fileSystem.GetFileInfo(path);
@@ -83,8 +80,7 @@ namespace MediaBrowser.Controller.Providers
public List<string> GetFilePaths(string path, bool clearCache)
{
- List<string> result;
- if (clearCache || !_filePathCache.TryGetValue(path, out result))
+ if (clearCache || !_filePathCache.TryGetValue(path, out List<string> result))
{
result = _fileSystem.GetFilePaths(path).ToList();