aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/DevicesController.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2024-09-05 12:55:15 +0200
committerShadowghost <Ghost_of_Stone@web.de>2024-09-18 15:42:15 +0200
commit7a2427bf07f9036d62c88a75855cd6dc7e8e3064 (patch)
tree8a3211a265a36d35b2d707880d9ca504a5c5ccd4 /Jellyfin.Api/Controllers/DevicesController.cs
parent569a41fc2a518672684b28a106241ecd8c9ceb67 (diff)
Add SessionInfoDto, DeviceInfoDto and implement JsonDelimitedArrayConverter.Write
Diffstat (limited to 'Jellyfin.Api/Controllers/DevicesController.cs')
-rw-r--r--Jellyfin.Api/Controllers/DevicesController.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/DevicesController.cs b/Jellyfin.Api/Controllers/DevicesController.cs
index 2a2ab4ad1..50050262f 100644
--- a/Jellyfin.Api/Controllers/DevicesController.cs
+++ b/Jellyfin.Api/Controllers/DevicesController.cs
@@ -1,15 +1,13 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
-using Jellyfin.Api.Constants;
using Jellyfin.Api.Helpers;
using Jellyfin.Data.Dtos;
-using Jellyfin.Data.Entities.Security;
using Jellyfin.Data.Queries;
using MediaBrowser.Common.Api;
using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Session;
-using MediaBrowser.Model.Devices;
+using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Querying;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
@@ -47,7 +45,7 @@ public class DevicesController : BaseJellyfinApiController
/// <returns>An <see cref="OkResult"/> containing the list of devices.</returns>
[HttpGet]
[ProducesResponseType(StatusCodes.Status200OK)]
- public ActionResult<QueryResult<DeviceInfo>> GetDevices([FromQuery] Guid? userId)
+ public ActionResult<QueryResult<DeviceInfoDto>> GetDevices([FromQuery] Guid? userId)
{
userId = RequestHelpers.GetUserId(User, userId);
return _deviceManager.GetDevicesForUser(userId);
@@ -63,7 +61,7 @@ public class DevicesController : BaseJellyfinApiController
[HttpGet("Info")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
- public ActionResult<DeviceInfo> GetDeviceInfo([FromQuery, Required] string id)
+ public ActionResult<DeviceInfoDto> GetDeviceInfo([FromQuery, Required] string id)
{
var deviceInfo = _deviceManager.GetDevice(id);
if (deviceInfo is null)
@@ -84,7 +82,7 @@ public class DevicesController : BaseJellyfinApiController
[HttpGet("Options")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
- public ActionResult<DeviceOptions> GetDeviceOptions([FromQuery, Required] string id)
+ public ActionResult<DeviceOptionsDto> GetDeviceOptions([FromQuery, Required] string id)
{
var deviceInfo = _deviceManager.GetDeviceOptions(id);
if (deviceInfo is null)