diff --git a/MediaBrowser.Api/Movies/MoviesService.cs b/MediaBrowser.Api/Movies/MoviesService.cs index 8a6e5b8df..b06007c78 100644 --- a/MediaBrowser.Api/Movies/MoviesService.cs +++ b/MediaBrowser.Api/Movies/MoviesService.cs @@ -14,6 +14,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using MediaBrowser.Controller.LiveTv; namespace MediaBrowser.Api.Movies { @@ -132,13 +133,15 @@ namespace MediaBrowser.Api.Movies var query = new InternalItemsQuery(user) { - IncludeItemTypes = new[] { typeof(Movie).Name } + IncludeItemTypes = new[] + { + typeof(Movie).Name, + typeof(Trailer).Name, + //typeof(LiveTvProgram).Name + }, + // IsMovie = true }; - var includeList = query.IncludeItemTypes.ToList(); - includeList.Add(typeof(Trailer).Name); - query.IncludeItemTypes = includeList.ToArray(); - var parentIds = string.IsNullOrWhiteSpace(request.ParentId) ? new string[] { } : new[] { request.ParentId }; var movies = _libraryManager.GetItemList(query, parentIds) .OrderBy(i => (int)i.SourceType); @@ -179,16 +182,18 @@ namespace MediaBrowser.Api.Movies var item = string.IsNullOrEmpty(request.Id) ? (!string.IsNullOrWhiteSpace(request.UserId) ? user.RootFolder : _libraryManager.RootFolder) : _libraryManager.GetItemById(request.Id); - + var query = new InternalItemsQuery(user) { - IncludeItemTypes = new[] { typeof(Movie).Name } + IncludeItemTypes = new[] + { + typeof(Movie).Name, + typeof(Trailer).Name, + //typeof(LiveTvProgram).Name + }, + //IsMovie = true }; - var includeList = query.IncludeItemTypes.ToList(); - includeList.Add(typeof(Trailer).Name); - query.IncludeItemTypes = includeList.ToArray(); - var list = _libraryManager.GetItemList(query) .OrderBy(i => (int)i.SourceType) .DistinctBy(i => i.GetProviderId(MetadataProviders.Imdb) ?? Guid.NewGuid().ToString("N")) diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index 615276e83..1f3b0c92a 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -179,17 +179,13 @@ namespace MediaBrowser.Controller.Entities.Audio { var items = GetRecursiveChildren().ToList(); - var songs = items.OfType