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

This commit is contained in:
github@esslinger.dev 2020-10-02 18:29:59 +02:00
commit c3e7eb3a6f
2 changed files with 2 additions and 2 deletions

View File

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

View File

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