diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-05-21 03:26:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-21 03:26:26 -0400 |
| commit | 459dd30033bffbae1139425527760f10c5875391 (patch) | |
| tree | 272885f917e0583cb7f0ec19836f857fe779c65e /Emby.Dlna/ContentDirectory/ControlHandler.cs | |
| parent | fe7e8fb5f898aadb420855738ec5b4d9d6a84694 (diff) | |
| parent | d3fdfbb36853ff8937e0f49c2cf8fa2a23a5c114 (diff) | |
Merge pull request #2654 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Dlna/ContentDirectory/ControlHandler.cs')
| -rw-r--r-- | Emby.Dlna/ContentDirectory/ControlHandler.cs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs index 2251a8f58..a5229c4fa 100644 --- a/Emby.Dlna/ContentDirectory/ControlHandler.cs +++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs @@ -23,6 +23,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using System.Xml; +using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Model.Globalization; @@ -459,10 +460,16 @@ namespace Emby.Dlna.ContentDirectory IsMissing = false, ExcludeItemTypes = new[] { typeof(Game).Name, typeof(Book).Name }, IsFolder = isFolder, - MediaTypes = mediaTypes.ToArray() + MediaTypes = mediaTypes.ToArray(), + DtoOptions = GetDtoOptions() }); } + private DtoOptions GetDtoOptions() + { + return new DtoOptions(true); + } + private async Task<QueryResult<ServerItem>> GetUserItems(BaseItem item, StubType? stubType, User user, SortCriteria sort, int? startIndex, int? limit) { if (item is MusicGenre) @@ -513,7 +520,8 @@ namespace Emby.Dlna.ContentDirectory IsMissing = false, PresetViews = new[] {CollectionType.Movies, CollectionType.TvShows, CollectionType.Music}, ExcludeItemTypes = new[] {typeof (Game).Name, typeof (Book).Name}, - IsPlaceHolder = false + IsPlaceHolder = false, + DtoOptions = GetDtoOptions() }; SetSorting(query, sort, folder.IsPreSorted); @@ -532,7 +540,8 @@ namespace Emby.Dlna.ContentDirectory ArtistIds = new[] { item.Id.ToString("N") }, IncludeItemTypes = new[] { typeof(MusicAlbum).Name }, Limit = limit, - StartIndex = startIndex + StartIndex = startIndex, + DtoOptions = GetDtoOptions() }; SetSorting(query, sort, false); @@ -551,7 +560,8 @@ namespace Emby.Dlna.ContentDirectory GenreIds = new[] {item.Id.ToString("N")}, IncludeItemTypes = new[] {typeof (MusicAlbum).Name}, Limit = limit, - StartIndex = startIndex + StartIndex = startIndex, + DtoOptions = GetDtoOptions() }; SetSorting(query, sort, false); @@ -595,8 +605,8 @@ namespace Emby.Dlna.ContentDirectory IncludeItemTypes = new[] { typeof(Movie).Name, typeof(Series).Name, typeof(Trailer).Name }, SortBy = new[] { ItemSortBy.SortName }, Limit = limit, - StartIndex = startIndex - + StartIndex = startIndex, + DtoOptions = GetDtoOptions() }); var serverItems = itemsResult.Items.Select(i => new ServerItem(i)) |
