diff options
| author | crobibero <cody@robibe.ro> | 2021-02-10 17:09:23 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2021-02-10 17:09:23 -0700 |
| commit | 223b42aed3395f7d01ea513bf352cdf4fd3e7002 (patch) | |
| tree | 9bd448acb7e4c3422ae0f278265fe79492311c91 /Jellyfin.Api/Helpers/RequestHelpers.cs | |
| parent | bd8c269ea2769a9684c7755633417e1e78d84a57 (diff) | |
Create BaseItemKind enum
Diffstat (limited to 'Jellyfin.Api/Helpers/RequestHelpers.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/RequestHelpers.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Jellyfin.Api/Helpers/RequestHelpers.cs b/Jellyfin.Api/Helpers/RequestHelpers.cs index db0ccc657..94856e03e 100644 --- a/Jellyfin.Api/Helpers/RequestHelpers.cs +++ b/Jellyfin.Api/Helpers/RequestHelpers.cs @@ -129,5 +129,21 @@ namespace Jellyfin.Api.Helpers TotalRecordCount = result.TotalRecordCount }; } + + internal static string[] GetItemTypeStrings(IReadOnlyList<BaseItemKind> itemKinds) + { + if (itemKinds.Count == 0) + { + return Array.Empty<string>(); + } + + var itemTypes = new string[itemKinds.Count]; + for (var i = 0; i < itemKinds.Count; i++) + { + itemTypes[i] = itemKinds[i].ToString(); + } + + return itemTypes; + } } } |
