The Free Software Media System - Server Backend & API
Use enum for BaseItemDto.ExtraType (#11261)
Niels van Velzen84b933d8355c
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.csindex 7812687ea3..5da9bea262 100644--- a/Emby.Server.Implementations/Dto/DtoService.cs+++ b/Emby.Server.Implementations/Dto/DtoService.cs@@ -903,10 +903,7 @@ namespace Emby.Server.Implementations.Dtoif (item is Audio audio){dto.Album = audio.Album;- if (audio.ExtraType.HasValue)- {- dto.ExtraType = audio.ExtraType.Value.ToString();- }+ dto.ExtraType = audio.ExtraType;var albumParent = audio.AlbumEntity;@@ -1058,10 +1055,7 @@ namespace Emby.Server.Implementations.Dtodto.Trickplay = _trickplayManager.GetTrickplayManifest(item).GetAwaiter().GetResult();}- if (video.ExtraType.HasValue)- {- dto.ExtraType = video.ExtraType.Value.ToString();- }+ dto.ExtraType = video.ExtraType;}if (options.ContainsField(ItemFields.MediaStreams))diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.csindex cfff717db2..6d5c84e1de 100644--- a/MediaBrowser.Model/Dto/BaseItemDto.cs+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs@@ -65,7 +65,7 @@ namespace MediaBrowser.Model.Dtopublic DateTime? DateLastMediaAdded { get; set; }- public string ExtraType { get; set; }+ public ExtraType? ExtraType { get; set; }public int? AirsBeforeSeasonNumber { get; set; }