Merge branch '4214-supported-commands-enum' of https://github.com/skyfrk/jellyfin into 4214-supported-commands-enum

pull/4252/head
github@esslinger.dev 4 years ago
commit c3e7eb3a6f

@ -392,7 +392,7 @@ namespace Jellyfin.Api.Controllers
_sessionManager.ReportCapabilities(id, new ClientCapabilities
{
PlayableMediaTypes = RequestHelpers.Split(playableMediaTypes, ',', true),
SupportedCommands = supportedCommands == null ? Array.Empty<GeneralCommandType>() : supportedCommands,
SupportedCommands = supportedCommands,
SupportsMediaControl = supportsMediaControl,
SupportsSync = supportsSync,
SupportsPersistentIdentifier = supportsPersistentIdentifier

@ -39,7 +39,7 @@ namespace Jellyfin.Api.ModelBinders
{
var values = Array.ConvertAll(
value.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries),
x => { return converter.ConvertFromString(x != null ? x.Trim() : x); });
x => converter.ConvertFromString(x?.Trim()));
var typedValues = Array.CreateInstance(elementType, values.Length);
values.CopyTo(typedValues, 0);

Loading…
Cancel
Save