The Free Software Media System - Server Backend & API
cinema mode fixes
Luke Pulverenti0708c23ed740
diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.csindex fbf246b3ab..f3b4f40534 100644--- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs+++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs@@ -123,7 +123,6 @@ namespace MediaBrowser.Controller.Entitiespublic SourceType[] SourceTypes { get; set; }public SourceType[] ExcludeSourceTypes { get; set; }public TrailerType[] TrailerTypes { get; set; }- public TrailerType[] ExcludeTrailerTypes { get; set; }public DayOfWeek[] AirDays { get; set; }public SeriesStatus[] SeriesStatuses { get; set; }@@ -165,7 +164,6 @@ namespace MediaBrowser.Controller.EntitiesSourceTypes = new SourceType[] { };ExcludeSourceTypes = new SourceType[] { };TrailerTypes = new TrailerType[] { };- ExcludeTrailerTypes = new TrailerType[] { };AirDays = new DayOfWeek[] { };SeriesStatuses = new SeriesStatus[] { };}diff --git a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.csindex 9ebae5d913..49012c65af 100644--- a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs+++ b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs@@ -102,15 +102,10 @@ namespace MediaBrowser.Server.Implementations.Introsif (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 },- ExcludeTrailerTypes = excludeTrailerTypes+ TrailerTypes = trailerTypes.ToArray()});candidates.AddRange(trailerResult.Select(i => new ItemWithTrailerdiff --git a/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs b/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.csindex 96d570ef9e..5fc9c31689 100644--- a/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs+++ b/MediaBrowser.Server.Implementations/Library/LocalTrailerPostScanTask.cs@@ -27,13 +27,16 @@ namespace MediaBrowser.Server.Implementations.Library.Cast<IHasTrailers>().ToList();+ var trailerTypes = Enum.GetNames(typeof(TrailerType))+ .Select(i => (TrailerType)Enum.Parse(typeof(TrailerType), i, true))+ .Except(new[] { TrailerType.LocalTrailer })+ .ToArray();+var trailers = _libraryManager.GetItemList(new InternalItemsQuery{IncludeItemTypes = new[] { typeof(Trailer).Name },- ExcludeTrailerTypes = new[]- {- TrailerType.LocalTrailer- }+ TrailerTypes = trailerTypes+}).ToArray();var numComplete = 0;diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.csindex fcc39deb50..25582852f8 100644--- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs+++ b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs@@ -1960,20 +1960,6 @@ namespace MediaBrowser.Server.Implementations.PersistencewhereClauses.Add(clause);}- if (query.ExcludeTrailerTypes.Length > 0)- {- var clauses = new List<string>();- var index = 0;- foreach (var type in query.ExcludeTrailerTypes)- {- clauses.Add("(TrailerTypes is null OR TrailerTypes not like @TrailerTypes" + index + ")");- cmd.Parameters.Add(cmd, "@TrailerTypes" + index, DbType.String).Value = "%" + type + "%";- index++;- }- var clause = "(" + string.Join(" AND ", clauses.ToArray()) + ")";- whereClauses.Add(clause);- }-if (query.IsAiring.HasValue){if (query.IsAiring.Value)