diff options
| author | crobibero <cody@robibe.ro> | 2020-11-15 13:12:43 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-11-15 13:12:43 -0700 |
| commit | 4b15284324cf65bc916a3112b7fc61c958ac70c5 (patch) | |
| tree | e125c2e1f04526509cc6f0c72e7e922c4276e02e /Jellyfin.Api/Extensions/DtoExtensions.cs | |
| parent | 7ff212576e1fba5980163bcc1cd97c29aadc635f (diff) | |
| parent | 2f426dfc97677deffb60420078b20a7f5f03977e (diff) | |
Merge remote-tracking branch 'upstream/master' into bye-tvdb
Diffstat (limited to 'Jellyfin.Api/Extensions/DtoExtensions.cs')
| -rw-r--r-- | Jellyfin.Api/Extensions/DtoExtensions.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Jellyfin.Api/Extensions/DtoExtensions.cs b/Jellyfin.Api/Extensions/DtoExtensions.cs index 6dee9db38..f2abd515d 100644 --- a/Jellyfin.Api/Extensions/DtoExtensions.cs +++ b/Jellyfin.Api/Extensions/DtoExtensions.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using System.Linq; using Jellyfin.Api.Helpers; +using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; @@ -43,7 +45,7 @@ namespace Jellyfin.Api.Extensions client.IndexOf("media center", StringComparison.OrdinalIgnoreCase) != -1 || client.IndexOf("classic", StringComparison.OrdinalIgnoreCase) != -1) { - int oldLen = dtoOptions.Fields.Length; + int oldLen = dtoOptions.Fields.Count; var arr = new ItemFields[oldLen + 1]; dtoOptions.Fields.CopyTo(arr, 0); arr[oldLen] = ItemFields.RecursiveItemCount; @@ -61,7 +63,7 @@ namespace Jellyfin.Api.Extensions client.IndexOf("samsung", StringComparison.OrdinalIgnoreCase) != -1 || client.IndexOf("androidtv", StringComparison.OrdinalIgnoreCase) != -1) { - int oldLen = dtoOptions.Fields.Length; + int oldLen = dtoOptions.Fields.Count; var arr = new ItemFields[oldLen + 1]; dtoOptions.Fields.CopyTo(arr, 0); arr[oldLen] = ItemFields.ChildCount; @@ -90,7 +92,7 @@ namespace Jellyfin.Api.Extensions bool? enableImages, bool? enableUserData, int? imageTypeLimit, - ImageType[] enableImageTypes) + IReadOnlyList<ImageType> enableImageTypes) { dtoOptions.EnableImages = enableImages ?? true; @@ -104,7 +106,7 @@ namespace Jellyfin.Api.Extensions dtoOptions.EnableUserData = enableUserData.Value; } - if (enableImageTypes.Length != 0) + if (enableImageTypes.Count != 0) { dtoOptions.ImageTypes = enableImageTypes; } |
