aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/Folder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities/Folder.cs')
-rw-r--r--MediaBrowser.Controller/Entities/Folder.cs12
1 files changed, 3 insertions, 9 deletions
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index d34fb75a7..f862ce61b 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -4,7 +4,6 @@ using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Localization;
using MediaBrowser.Controller.Resolvers;
-using MediaBrowser.Controller.Sorting;
using MediaBrowser.Model.Entities;
using System;
using System.Collections.Concurrent;
@@ -714,7 +713,7 @@ namespace MediaBrowser.Controller.Entities
catch (IOException ex)
{
Logger.ErrorException("Error getting ResolveArgs for {0}", ex, Path);
- return new List<BaseItem> { };
+ return new List<BaseItem>();
}
return LibraryManager.ResolvePaths<BaseItem>(fileSystemChildren, this);
@@ -754,12 +753,7 @@ namespace MediaBrowser.Controller.Entities
}
// If indexed is false or the indexing function is null
- if (result == null)
- {
- result = ActualChildren.Where(c => c.IsVisible(user));
- }
-
- return result;
+ return result ?? (ActualChildren.Where(c => c.IsVisible(user)));
}
/// <summary>
@@ -799,7 +793,7 @@ namespace MediaBrowser.Controller.Entities
{
await base.ChangedExternally().ConfigureAwait(false);
- var progress = new Progress<double> { };
+ var progress = new Progress<double>();
await ValidateChildren(progress, CancellationToken.None).ConfigureAwait(false);
}