aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-25 13:52:36 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-25 13:52:36 -0400
commitd9108f69f35080acb5ebefaefcd469595529afa2 (patch)
tree3f04e719877b9cdec9529ca34406b753f6492abc /MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs
parentd6832e7a41c2a24f7dd998284e8e4f6eacf1d188 (diff)
parent72fe76ab1008f0bd38157cc37cde45797b5f6417 (diff)
Merge branch 'master' of https://github.com/MediaBrowser/Emby
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs b/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs
index b72406730..4e23b5e93 100644
--- a/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs
+++ b/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs
@@ -4,6 +4,7 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Channels;
using MediaBrowser.Model.Entities;
using System;
+using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@@ -28,12 +29,14 @@ namespace MediaBrowser.Server.Implementations.Library
.Cast<IHasTrailers>()
.ToList();
- var channelTrailerResult = await _channelManager.GetAllMediaInternal(new AllChannelMediaQuery
+ var trailers = _libraryManager.GetItemList(new InternalItemsQuery
{
- ExtraTypes = new[] { ExtraType.Trailer }
-
- }, CancellationToken.None);
- var channelTrailers = channelTrailerResult.Items;
+ IncludeItemTypes = new[] { typeof(Trailer).Name },
+ ExcludeTrailerTypes = new[]
+ {
+ TrailerType.LocalTrailer
+ }
+ }).ToArray();
var numComplete = 0;
@@ -41,7 +44,7 @@ namespace MediaBrowser.Server.Implementations.Library
{
cancellationToken.ThrowIfCancellationRequested();
- await AssignTrailers(item, channelTrailers).ConfigureAwait(false);
+ await AssignTrailers(item, trailers).ConfigureAwait(false);
numComplete++;
double percent = numComplete;