|
|
|
@ -165,33 +165,6 @@ namespace Jellyfin.Api.Helpers
|
|
|
|
|
.ToArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the item fields.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="imageTypes">The image types string.</param>
|
|
|
|
|
/// <returns>IEnumerable{ItemFields}.</returns>
|
|
|
|
|
internal static ImageType[] GetImageTypes(string? imageTypes)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(imageTypes))
|
|
|
|
|
{
|
|
|
|
|
return Array.Empty<ImageType>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Split(imageTypes, ',', true)
|
|
|
|
|
.Select(v =>
|
|
|
|
|
{
|
|
|
|
|
if (Enum.TryParse(v, true, out ImageType value))
|
|
|
|
|
{
|
|
|
|
|
return (ImageType?)value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
})
|
|
|
|
|
.Where(i => i.HasValue)
|
|
|
|
|
.Select(i => i!.Value)
|
|
|
|
|
.ToArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal static QueryResult<BaseItemDto> CreateQueryResult(
|
|
|
|
|
QueryResult<(BaseItem, ItemCounts)> result,
|
|
|
|
|
DtoOptions dtoOptions,
|
|
|
|
|