From 8523d0aa2b01befc46e9fe629a42f275d015f8e3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 19 Oct 2015 11:33:49 -0400 Subject: [PATCH] fix dlna playlist --- .../Channels/ChannelManager.cs | 19 +++++++++++++++++-- .../Intros/DefaultIntroProvider.cs | 12 ++++++++++-- .../Library/MusicManager.cs | 17 +++++++++++++---- .../MediaBrowser.WebDashboard.csproj | 3 +++ SharedVersion.cs | 4 ++-- 5 files changed, 45 insertions(+), 10 deletions(-) diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs index 63f4f2e7ec..70005725fd 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs +++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs @@ -140,8 +140,23 @@ namespace MediaBrowser.Server.Implementations.Channels if (user != null) { - channels = channels.Where(i => GetChannelProvider(i).IsEnabledFor(user.Id.ToString("N")) && i.IsVisible(user)) - .ToList(); + channels = channels.Where(i => + { + if (!i.IsVisible(user)) + { + return false; + } + + try + { + return GetChannelProvider(i).IsEnabledFor(user.Id.ToString("N")); + } + catch + { + return false; + } + + }).ToList(); } var all = channels; diff --git a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs index 3ead061ca0..ec94e16dbf 100644 --- a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs +++ b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs @@ -83,8 +83,16 @@ namespace MediaBrowser.Server.Implementations.Intros if (config.EnableIntrosFromMoviesInLibrary) { - var itemsWithTrailers = user.RootFolder - .GetRecursiveChildren(user, i => + var inputItems = _libraryManager.GetItems(new InternalItemsQuery + { + IncludeItemTypes = new[] { typeof(Movie).Name }, + + User = user + + }).Items; + + var itemsWithTrailers = inputItems + .Where(i => { var hasTrailers = i as IHasTrailers; diff --git a/MediaBrowser.Server.Implementations/Library/MusicManager.cs b/MediaBrowser.Server.Implementations/Library/MusicManager.cs index 683e6c5cc4..aee101ef45 100644 --- a/MediaBrowser.Server.Implementations/Library/MusicManager.cs +++ b/MediaBrowser.Server.Implementations/Library/MusicManager.cs @@ -78,10 +78,19 @@ namespace MediaBrowser.Server.Implementations.Library public IEnumerable