Added poor man's multi-file movie support

This commit is contained in:
Luke Pulverenti
2013-06-12 17:46:50 -04:00
parent 455de48a65
commit def3428199
20 changed files with 353 additions and 54 deletions

View File

@@ -142,9 +142,15 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
var video = item as Video;
if (video != null && video.Chapters != null)
if (video != null)
{
images = images.Concat(video.Chapters.Where(i => !string.IsNullOrEmpty(i.ImagePath)).Select(i => i.ImagePath));
if (video.Chapters != null)
{
images = images.Concat(video.Chapters.Where(i => !string.IsNullOrEmpty(i.ImagePath)).Select(i => i.ImagePath));
}
var additionalParts = _itemRepo.GetItems(video.AdditionalPartIds).ToList();
images = additionalParts.Aggregate(images, (current, subItem) => current.Concat(GetPathsInUse(subItem)));
}
var movie = item as Movie;

View File

@@ -222,6 +222,7 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
items.AddRange(themeVideos);
items.AddRange(videos.SelectMany(i => _itemRepo.GetItems(i.AdditionalPartIds).Cast<Video>()).ToList());
items.AddRange(videos.OfType<Movie>().SelectMany(i => _itemRepo.GetItems(i.SpecialFeatureIds).Cast<Video>()).ToList());
return items.Where(i =>