diff options
Diffstat (limited to 'MediaBrowser.Controller/Providers')
| -rw-r--r-- | MediaBrowser.Controller/Providers/DirectoryService.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Providers/ItemLookupInfo.cs | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs index e17ae76ffd..751de9fb4f 100644 --- a/MediaBrowser.Controller/Providers/DirectoryService.cs +++ b/MediaBrowser.Controller/Providers/DirectoryService.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Model.Logging; +using System.Collections.Concurrent; +using MediaBrowser.Model.Logging; using System; using System.Collections.Generic; using System.IO; @@ -19,7 +20,7 @@ namespace MediaBrowser.Controller.Providers { private readonly ILogger _logger; - private readonly Dictionary<string, List<FileSystemInfo>> _cache = new Dictionary<string, List<FileSystemInfo>>(StringComparer.OrdinalIgnoreCase); + private readonly ConcurrentDictionary<string, List<FileSystemInfo>> _cache = new ConcurrentDictionary<string, List<FileSystemInfo>>(StringComparer.OrdinalIgnoreCase); public DirectoryService(ILogger logger) { @@ -43,7 +44,7 @@ namespace MediaBrowser.Controller.Providers entries = new List<FileSystemInfo>(); } - _cache.Add(path, entries); + _cache.TryAdd(path, entries); } return entries; diff --git a/MediaBrowser.Controller/Providers/ItemLookupInfo.cs b/MediaBrowser.Controller/Providers/ItemLookupInfo.cs index b43654005a..665da28f48 100644 --- a/MediaBrowser.Controller/Providers/ItemLookupInfo.cs +++ b/MediaBrowser.Controller/Providers/ItemLookupInfo.cs @@ -142,7 +142,7 @@ namespace MediaBrowser.Controller.Providers public class TrailerInfo : ItemLookupInfo { - + public bool IsLocalTrailer { get; set; } } public class BookInfo : ItemLookupInfo |
