diff options
| author | Bond-009 <bond.009@outlook.com> | 2021-02-11 17:12:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-11 17:12:35 +0100 |
| commit | a2ac4d3dd77623ada99d76a2bdccbd076246253a (patch) | |
| tree | 80bf3877e645bb9d21e8fde3aa0a3cb475b26678 /Jellyfin.Api/Helpers/RequestHelpers.cs | |
| parent | d490c1c2bcb2852c9159e8578bc7a60e086e4202 (diff) | |
| parent | 223b42aed3395f7d01ea513bf352cdf4fd3e7002 (diff) | |
Merge pull request #5209 from crobibero/base-item-kind
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; + } } } |
