update data queries

This commit is contained in:
Luke Pulverenti
2017-05-21 03:25:49 -04:00
parent ead88d3b65
commit da77b05817
62 changed files with 620 additions and 446 deletions

View File

@@ -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))