|
@@ -138,29 +138,33 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
|
|
images = images.Concat(item.ScreenshotImagePaths);
|
|
images = images.Concat(item.ScreenshotImagePaths);
|
|
}
|
|
}
|
|
|
|
|
|
- var video = item as Video;
|
|
|
|
|
|
+ if (item.LocalTrailers != null)
|
|
|
|
+ {
|
|
|
|
+ images = item.LocalTrailers.Aggregate(images, (current, subItem) => current.Concat(GetPathsInUse(subItem)));
|
|
|
|
+ }
|
|
|
|
|
|
- if (video != null && video.Chapters != null)
|
|
|
|
|
|
+ if (item.ThemeSongs != null)
|
|
{
|
|
{
|
|
- images = images.Concat(video.Chapters.Where(i => !string.IsNullOrEmpty(i.ImagePath)).Select(i => i.ImagePath));
|
|
|
|
|
|
+ images = item.ThemeSongs.Aggregate(images, (current, subItem) => current.Concat(GetPathsInUse(subItem)));
|
|
}
|
|
}
|
|
|
|
|
|
- if (item.LocalTrailers != null)
|
|
|
|
|
|
+ if (item.ThemeVideos != null)
|
|
{
|
|
{
|
|
- foreach (var subItem in item.LocalTrailers)
|
|
|
|
- {
|
|
|
|
- images = images.Concat(GetPathsInUse(subItem));
|
|
|
|
- }
|
|
|
|
|
|
+ images = item.ThemeVideos.Aggregate(images, (current, subItem) => current.Concat(GetPathsInUse(subItem)));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var video = item as Video;
|
|
|
|
+
|
|
|
|
+ if (video != null && video.Chapters != null)
|
|
|
|
+ {
|
|
|
|
+ images = images.Concat(video.Chapters.Where(i => !string.IsNullOrEmpty(i.ImagePath)).Select(i => i.ImagePath));
|
|
}
|
|
}
|
|
|
|
|
|
var movie = item as Movie;
|
|
var movie = item as Movie;
|
|
|
|
|
|
if (movie != null && movie.SpecialFeatures != null)
|
|
if (movie != null && movie.SpecialFeatures != null)
|
|
{
|
|
{
|
|
- foreach (var subItem in movie.SpecialFeatures)
|
|
|
|
- {
|
|
|
|
- images = images.Concat(GetPathsInUse(subItem));
|
|
|
|
- }
|
|
|
|
|
|
+ images = movie.SpecialFeatures.Aggregate(images, (current, subItem) => current.Concat(GetPathsInUse(subItem)));
|
|
}
|
|
}
|
|
|
|
|
|
return images;
|
|
return images;
|