From 1d2b6329bf3d395c57ac45a0f56b2e15bbee4c22 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 19 Mar 2016 11:38:05 -0400 Subject: update channels --- .../Library/LocalTrailerPostScanTask.cs | 11 ++++++----- .../Library/UserViewManager.cs | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library') diff --git a/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs b/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs index b72406730..e776e58f9 100644 --- a/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs +++ b/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs @@ -28,12 +28,13 @@ namespace MediaBrowser.Server.Implementations.Library .Cast() .ToList(); - var channelTrailerResult = await _channelManager.GetAllMediaInternal(new AllChannelMediaQuery + var trailerResult = _libraryManager.GetItems(new InternalItemsQuery { - ExtraTypes = new[] { ExtraType.Trailer } + IncludeItemTypes = new[] { typeof(Trailer).Name }, + //IsLocalTrailer = false - }, CancellationToken.None); - var channelTrailers = channelTrailerResult.Items; + }); + var trailers = trailerResult.Items; var numComplete = 0; @@ -41,7 +42,7 @@ namespace MediaBrowser.Server.Implementations.Library { cancellationToken.ThrowIfCancellationRequested(); - await AssignTrailers(item, channelTrailers).ConfigureAwait(false); + await AssignTrailers(item, trailers).ConfigureAwait(false); numComplete++; double percent = numComplete; diff --git a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs index b612e0e37..9d276ada2 100644 --- a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs @@ -287,7 +287,7 @@ namespace MediaBrowser.Server.Implementations.Library ExcludeItemTypes = excludeItemTypes, ExcludeLocationTypes = new[] { LocationType.Virtual }, Limit = limit * 20, - SourceTypes = new[] { SourceType.Library } + ExcludeSourceTypes = parentIds.Length == 0 ? new[] { SourceType.Channel, SourceType.LiveTV } : new SourceType[] { } }, parentIds); } -- cgit v1.2.3