aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Intros/DefaultIntroProvider.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-01-07 03:04:54 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-01-07 03:04:54 -0500
commitba9222898b9ad0e5165fc7d34636cdbbc3385dba (patch)
tree0cec66d9501d03d49444ef048907e8fc890b3530 /Emby.Server.Implementations/Intros/DefaultIntroProvider.cs
parentb253b86338c613d9977a4db70bef3e5a6eb4f2c5 (diff)
update intro queries
Diffstat (limited to 'Emby.Server.Implementations/Intros/DefaultIntroProvider.cs')
-rw-r--r--Emby.Server.Implementations/Intros/DefaultIntroProvider.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Intros/DefaultIntroProvider.cs b/Emby.Server.Implementations/Intros/DefaultIntroProvider.cs
index 180f6aba7..90bb2f5c0 100644
--- a/Emby.Server.Implementations/Intros/DefaultIntroProvider.cs
+++ b/Emby.Server.Implementations/Intros/DefaultIntroProvider.cs
@@ -100,7 +100,12 @@ namespace Emby.Server.Implementations.Intros
if (trailerTypes.Count > 0)
{
- var trailerResult = _libraryManager.GetItemList(new InternalItemsQuery
+ if (trailerTypes.Count >= 5)
+ {
+ trailerTypes.Clear();
+ }
+
+ var trailerResult = _libraryManager.GetItemList(new InternalItemsQuery(user)
{
IncludeItemTypes = new[] { typeof(Trailer).Name },
TrailerTypes = trailerTypes.ToArray(),
@@ -111,7 +116,8 @@ namespace Emby.Server.Implementations.Intros
// Account for duplicates by imdb id, since the database doesn't support this yet
Limit = config.TrailerLimit * 2,
- SourceTypes = sourceTypes.ToArray()
+ SourceTypes = sourceTypes.ToArray(),
+ MinSimilarityScore = 0
}).Where(i => string.IsNullOrWhiteSpace(i.GetProviderId(MetadataProviders.Imdb)) || !string.Equals(i.GetProviderId(MetadataProviders.Imdb), item.GetProviderId(MetadataProviders.Imdb), StringComparison.OrdinalIgnoreCase)).Take(config.TrailerLimit);