mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-26 03:57:12 +00:00
removed null checks that are no longer needed
This commit is contained in:
@@ -125,22 +125,11 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
|
||||
/// <returns>IEnumerable{System.String}.</returns>
|
||||
private IEnumerable<string> GetPathsInUse(BaseItem item)
|
||||
{
|
||||
IEnumerable<string> images = new List<string>();
|
||||
IEnumerable<string> images = item.Images.Values.ToList();
|
||||
|
||||
if (item.Images != null)
|
||||
{
|
||||
images = images.Concat(item.Images.Values);
|
||||
}
|
||||
images = images.Concat(item.BackdropImagePaths);
|
||||
|
||||
if (item.BackdropImagePaths != null)
|
||||
{
|
||||
images = images.Concat(item.BackdropImagePaths);
|
||||
}
|
||||
|
||||
if (item.ScreenshotImagePaths != null)
|
||||
{
|
||||
images = images.Concat(item.ScreenshotImagePaths);
|
||||
}
|
||||
images = images.Concat(item.ScreenshotImagePaths);
|
||||
|
||||
var localTrailers = _itemRepo.GetItems(item.LocalTrailerIds).ToList();
|
||||
images = localTrailers.Aggregate(images, (current, subItem) => current.Concat(GetPathsInUse(subItem)));
|
||||
@@ -162,8 +151,8 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
|
||||
|
||||
if (movie != null)
|
||||
{
|
||||
var specialFeattures = _itemRepo.GetItems(movie.SpecialFeatureIds).ToList();
|
||||
images = specialFeattures.Aggregate(images, (current, subItem) => current.Concat(GetPathsInUse(subItem)));
|
||||
var specialFeatures = _itemRepo.GetItems(movie.SpecialFeatureIds).ToList();
|
||||
images = specialFeatures.Aggregate(images, (current, subItem) => current.Concat(GetPathsInUse(subItem)));
|
||||
}
|
||||
|
||||
return images;
|
||||
|
||||
Reference in New Issue
Block a user