aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Dlna/DeviceProfile.cs
diff options
context:
space:
mode:
authorPithaya <19533412+Pithaya@users.noreply.github.com>2023-11-13 18:07:23 +0100
committerGitHub <noreply@github.com>2023-11-13 18:07:23 +0100
commiteb2bcc91c5e8182bddf1ab5d6ee2a951da66e9c6 (patch)
tree97bf08a7c3f3ebae72c0c89ffccd2917fad3cb2c /MediaBrowser.Model/Dlna/DeviceProfile.cs
parent948a67cfeb1aa045099c4486da4eb1fd459a676f (diff)
parentea546230586a00a75db5c379db904e47cbbf270b (diff)
Merge branch 'master' into feat/book-persons
Diffstat (limited to 'MediaBrowser.Model/Dlna/DeviceProfile.cs')
-rw-r--r--MediaBrowser.Model/Dlna/DeviceProfile.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs
index 07bb002ea..71d0896a7 100644
--- a/MediaBrowser.Model/Dlna/DeviceProfile.cs
+++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs
@@ -1,6 +1,7 @@
#pragma warning disable CA1819 // Properties should not return arrays
using System;
using System.ComponentModel;
+using System.Linq;
using System.Xml.Serialization;
using Jellyfin.Data.Enums;
using Jellyfin.Extensions;
@@ -227,9 +228,12 @@ namespace MediaBrowser.Model.Dlna
/// The GetSupportedMediaTypes.
/// </summary>
/// <returns>The .</returns>
- public string[] GetSupportedMediaTypes()
+ public MediaType[] GetSupportedMediaTypes()
{
- return ContainerProfile.SplitValue(SupportedMediaTypes);
+ return ContainerProfile.SplitValue(SupportedMediaTypes)
+ .Select(m => Enum.TryParse<MediaType>(m, out var parsed) ? parsed : MediaType.Unknown)
+ .Where(m => m != MediaType.Unknown)
+ .ToArray();
}
/// <summary>