diff options
| author | github@esslinger.dev <simon@esslinger.dev> | 2020-10-01 18:43:44 +0200 |
|---|---|---|
| committer | github@esslinger.dev <simon@esslinger.dev> | 2020-10-01 18:43:44 +0200 |
| commit | dd4f3a7c5184afbada50a038564c95fa780e04f8 (patch) | |
| tree | 75e4b14f945384ec1a4b67677fbb6d87a6453712 /Jellyfin.Api/Controllers/SessionController.cs | |
| parent | c7b3d4a90c946f9a2438622cc0ca43d19b84bef8 (diff) | |
feat: convert supportedCommands strings to enums
Diffstat (limited to 'Jellyfin.Api/Controllers/SessionController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SessionController.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs index 39bf6e6dc..2ed7019e5 100644 --- a/Jellyfin.Api/Controllers/SessionController.cs +++ b/Jellyfin.Api/Controllers/SessionController.cs @@ -366,7 +366,7 @@ namespace Jellyfin.Api.Controllers /// </summary> /// <param name="id">The session id.</param> /// <param name="playableMediaTypes">A list of playable media types, comma delimited. Audio, Video, Book, Photo.</param> - /// <param name="supportedCommands">A list of supported remote control commands, comma delimited.</param> + /// <param name="supportedCommands">A list of supported remote control commands.</param> /// <param name="supportsMediaControl">Determines whether media can be played remotely..</param> /// <param name="supportsSync">Determines whether sync is supported.</param> /// <param name="supportsPersistentIdentifier">Determines whether the device supports a unique identifier.</param> @@ -378,7 +378,7 @@ namespace Jellyfin.Api.Controllers public ActionResult PostCapabilities( [FromQuery] string? id, [FromQuery] string? playableMediaTypes, - [FromQuery] string? supportedCommands, + [FromQuery] GeneralCommandType[] supportedCommands, [FromQuery] bool supportsMediaControl = false, [FromQuery] bool supportsSync = false, [FromQuery] bool supportsPersistentIdentifier = true) @@ -391,7 +391,7 @@ namespace Jellyfin.Api.Controllers _sessionManager.ReportCapabilities(id, new ClientCapabilities { PlayableMediaTypes = RequestHelpers.Split(playableMediaTypes, ',', true), - SupportedCommands = RequestHelpers.Split(supportedCommands, ',', true), + SupportedCommands = supportedCommands == null ? Array.Empty<GeneralCommandType>() : supportedCommands, SupportsMediaControl = supportsMediaControl, SupportsSync = supportsSync, SupportsPersistentIdentifier = supportsPersistentIdentifier |
