diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-30 12:37:29 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-30 12:37:29 -0400 |
| commit | f308a41cab09d8ee09bdc4188cbe6f7799730a2e (patch) | |
| tree | 06813b1ab7504b08537f49a50a87ed8a54c77f20 /MediaBrowser.Server.Implementations | |
| parent | b293211628409753b8d8f47c31bbf19414440f73 (diff) | |
update cinema mode trailer selection
Diffstat (limited to 'MediaBrowser.Server.Implementations')
3 files changed, 8 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs index 49012c65a..9ebae5d91 100644 --- a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs +++ b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs @@ -102,10 +102,15 @@ namespace MediaBrowser.Server.Implementations.Intros if (trailerTypes.Count > 0) { + var excludeTrailerTypes = Enum.GetNames(typeof(TrailerType)) + .Select(i => (TrailerType)Enum.Parse(typeof(TrailerType), i, true)) + .Except(trailerTypes) + .ToArray(); + var trailerResult = _libraryManager.GetItemList(new InternalItemsQuery { IncludeItemTypes = new[] { typeof(Trailer).Name }, - TrailerTypes = trailerTypes.ToArray() + ExcludeTrailerTypes = excludeTrailerTypes }); candidates.AddRange(trailerResult.Select(i => new ItemWithTrailer diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index 28671fb7c..ccba293a3 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -2361,6 +2361,7 @@ namespace MediaBrowser.Server.Implementations.Library } video.ExtraType = ExtraType.Trailer; + video.TrailerTypes = new List<TrailerType> { TrailerType.LocalTrailer }; return video; diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs index 4a7235928..de914b773 100644 --- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs +++ b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs @@ -79,7 +79,7 @@ namespace MediaBrowser.Server.Implementations.Persistence private IDbCommand _updateInheritedRatingCommand; - private const int LatestSchemaVersion = 55; + private const int LatestSchemaVersion = 56; /// <summary> /// Initializes a new instance of the <see cref="SqliteItemRepository"/> class. |
