aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Models
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2023-05-13 12:44:31 -0600
committerCody Robibero <cody@robibe.ro>2023-10-10 15:57:15 -0600
commit2920611ffc206d845563637c4a865bf3f02d1374 (patch)
treec69c43264165df71866220966929e7a07a907d20 /Jellyfin.Api/Models
parent74f61fbd79ef2e2ad4a986f5f886581b2827de07 (diff)
Convert string MediaType to enum MediaType
Diffstat (limited to 'Jellyfin.Api/Models')
-rw-r--r--Jellyfin.Api/Models/PlaylistDtos/CreatePlaylistDto.cs3
-rw-r--r--Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs3
2 files changed, 4 insertions, 2 deletions
diff --git a/Jellyfin.Api/Models/PlaylistDtos/CreatePlaylistDto.cs b/Jellyfin.Api/Models/PlaylistDtos/CreatePlaylistDto.cs
index 1fba32c5b..bdc488871 100644
--- a/Jellyfin.Api/Models/PlaylistDtos/CreatePlaylistDto.cs
+++ b/Jellyfin.Api/Models/PlaylistDtos/CreatePlaylistDto.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
+using Jellyfin.Data.Enums;
using Jellyfin.Extensions.Json.Converters;
namespace Jellyfin.Api.Models.PlaylistDtos;
@@ -29,5 +30,5 @@ public class CreatePlaylistDto
/// <summary>
/// Gets or sets the media type.
/// </summary>
- public string? MediaType { get; set; }
+ public MediaType? MediaType { get; set; }
}
diff --git a/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs b/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs
index b88be33b2..b021771a0 100644
--- a/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs
+++ b/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
+using Jellyfin.Data.Enums;
using Jellyfin.Extensions.Json.Converters;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Session;
@@ -16,7 +17,7 @@ public class ClientCapabilitiesDto
/// Gets or sets the list of playable media types.
/// </summary>
[JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
- public IReadOnlyList<string> PlayableMediaTypes { get; set; } = Array.Empty<string>();
+ public IReadOnlyList<MediaType> PlayableMediaTypes { get; set; } = Array.Empty<MediaType>();
/// <summary>
/// Gets or sets the list of supported commands.