aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/ContentDirectory/ControlHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Dlna/ContentDirectory/ControlHandler.cs')
-rw-r--r--Emby.Dlna/ContentDirectory/ControlHandler.cs22
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))