mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-15 06:36:37 +00:00
Use generic Enum overloads to resolve CA2263 warnings
Replace Enum.Parse(typeof(T), ...) and Enum.GetNames(typeof(T)) with their generic counterparts Enum.Parse<T>() and Enum.GetNames<T>() in MediaBrowser.Model/Dlna for improved type safety. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -324,7 +324,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
return !condition.IsRequired;
|
||||
}
|
||||
|
||||
var expected = (TransportStreamTimestamp)Enum.Parse(typeof(TransportStreamTimestamp), condition.Value, true);
|
||||
var expected = Enum.Parse<TransportStreamTimestamp>(condition.Value, true);
|
||||
|
||||
switch (condition.Condition)
|
||||
{
|
||||
|
||||
@@ -2009,7 +2009,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
else if (condition.Condition == ProfileConditionType.NotEquals)
|
||||
{
|
||||
item.SetOption(qualifier, "rangetype", string.Join(',', Enum.GetNames(typeof(VideoRangeType)).Except(values)));
|
||||
item.SetOption(qualifier, "rangetype", string.Join(',', Enum.GetNames<VideoRangeType>().Except(values)));
|
||||
}
|
||||
else if (condition.Condition == ProfileConditionType.EqualsAny)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user