2
0
Эх сурвалжийг харах

Applied Review Suggestions

JPVenson 8 сар өмнө
parent
commit
441b995189

+ 2 - 1
Emby.Server.Implementations/Data/ItemTypeLookup.cs

@@ -1,4 +1,5 @@
 using System;
 using System;
+using System.Collections.Frozen;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Threading.Channels;
 using System.Threading.Channels;
 using Emby.Server.Implementations.Playlists;
 using Emby.Server.Implementations.Playlists;
@@ -116,5 +117,5 @@ public class ItemTypeLookup : IItemTypeLookup
         { BaseItemKind.UserView, typeof(UserView).FullName },
         { BaseItemKind.UserView, typeof(UserView).FullName },
         { BaseItemKind.Video, typeof(Video).FullName },
         { BaseItemKind.Video, typeof(Video).FullName },
         { BaseItemKind.Year, typeof(Year).FullName }
         { BaseItemKind.Year, typeof(Year).FullName }
-    }.AsReadOnly();
+    }.ToFrozenDictionary();
 }
 }

+ 0 - 2
Jellyfin.Data/Entities/BaseItemMetadataField.cs

@@ -1,8 +1,6 @@
 using System;
 using System;
-using System.Collections.Generic;
 
 
 namespace Jellyfin.Data.Entities;
 namespace Jellyfin.Data.Entities;
-#pragma warning disable CA2227
 
 
 /// <summary>
 /// <summary>
 /// Enum MetadataFields.
 /// Enum MetadataFields.

+ 1 - 2
Jellyfin.Data/Entities/BaseItemTrailerType.cs

@@ -1,8 +1,7 @@
 using System;
 using System;
-using System.Collections.Generic;
 
 
 namespace Jellyfin.Data.Entities;
 namespace Jellyfin.Data.Entities;
-#pragma warning disable CA2227
+
 /// <summary>
 /// <summary>
 /// Enum TrailerTypes.
 /// Enum TrailerTypes.
 /// </summary>
 /// </summary>

+ 0 - 14
Jellyfin.Data/Entities/EnumLikeTable.cs

@@ -1,14 +0,0 @@
-using System.Collections.Generic;
-
-namespace Jellyfin.Data.Entities;
-
-/// <summary>
-/// Defines an Entity that is modeled after an Enum.
-/// </summary>
-public abstract class EnumLikeTable
-{
-    /// <summary>
-    /// Gets or Sets Numerical ID of this enumeratable.
-    /// </summary>
-    public required int Id { get; set; }
-}

+ 6 - 6
Jellyfin.Data/Entities/MediaStreamTypeEntity.cs

@@ -8,30 +8,30 @@ public enum MediaStreamTypeEntity
     /// <summary>
     /// <summary>
     /// The audio.
     /// The audio.
     /// </summary>
     /// </summary>
-    Audio,
+    Audio = 0,
 
 
     /// <summary>
     /// <summary>
     /// The video.
     /// The video.
     /// </summary>
     /// </summary>
-    Video,
+    Video = 1,
 
 
     /// <summary>
     /// <summary>
     /// The subtitle.
     /// The subtitle.
     /// </summary>
     /// </summary>
-    Subtitle,
+    Subtitle = 2,
 
 
     /// <summary>
     /// <summary>
     /// The embedded image.
     /// The embedded image.
     /// </summary>
     /// </summary>
-    EmbeddedImage,
+    EmbeddedImage = 3,
 
 
     /// <summary>
     /// <summary>
     /// The data.
     /// The data.
     /// </summary>
     /// </summary>
-    Data,
+    Data = 4,
 
 
     /// <summary>
     /// <summary>
     /// The lyric.
     /// The lyric.
     /// </summary>
     /// </summary>
-    Lyric
+    Lyric = 5
 }
 }

+ 6 - 6
Jellyfin.Data/Entities/ProgramAudioEntity.cs

@@ -8,30 +8,30 @@ public enum ProgramAudioEntity
     /// <summary>
     /// <summary>
     /// Mono.
     /// Mono.
     /// </summary>
     /// </summary>
-    Mono,
+    Mono = 0,
 
 
     /// <summary>
     /// <summary>
     /// Sterio.
     /// Sterio.
     /// </summary>
     /// </summary>
-    Stereo,
+    Stereo = 1,
 
 
     /// <summary>
     /// <summary>
     /// Dolby.
     /// Dolby.
     /// </summary>
     /// </summary>
-    Dolby,
+    Dolby = 2,
 
 
     /// <summary>
     /// <summary>
     /// DolbyDigital.
     /// DolbyDigital.
     /// </summary>
     /// </summary>
-    DolbyDigital,
+    DolbyDigital = 3,
 
 
     /// <summary>
     /// <summary>
     /// Thx.
     /// Thx.
     /// </summary>
     /// </summary>
-    Thx,
+    Thx = 4,
 
 
     /// <summary>
     /// <summary>
     /// Atmos.
     /// Atmos.
     /// </summary>
     /// </summary>
-    Atmos
+    Atmos = 5
 }
 }