|
|
|
@ -1,12 +1,9 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Net;
|
|
|
|
|
using Jellyfin.Data.Enums;
|
|
|
|
|
using MediaBrowser.Common.Extensions;
|
|
|
|
|
using MediaBrowser.Controller.Net;
|
|
|
|
|
using MediaBrowser.Controller.Session;
|
|
|
|
|
using MediaBrowser.Model.Querying;
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
|
|
|
|
|
namespace Jellyfin.Api.Helpers
|
|
|
|
@ -135,31 +132,5 @@ namespace Jellyfin.Api.Helpers
|
|
|
|
|
.Select(i => new Guid(i))
|
|
|
|
|
.ToArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the item fields.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fields">The fields string.</param>
|
|
|
|
|
/// <returns>IEnumerable{ItemFields}.</returns>
|
|
|
|
|
internal static ItemFields[] GetItemFields(string? fields)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(fields))
|
|
|
|
|
{
|
|
|
|
|
return Array.Empty<ItemFields>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Split(fields, ',', true)
|
|
|
|
|
.Select(v =>
|
|
|
|
|
{
|
|
|
|
|
if (Enum.TryParse(v, true, out ItemFields value))
|
|
|
|
|
{
|
|
|
|
|
return (ItemFields?)value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}).Where(i => i.HasValue)
|
|
|
|
|
.Select(i => i!.Value)
|
|
|
|
|
.ToArray();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|