aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/RequestHelpers.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2021-02-11 17:12:35 +0100
committerGitHub <noreply@github.com>2021-02-11 17:12:35 +0100
commita2ac4d3dd77623ada99d76a2bdccbd076246253a (patch)
tree80bf3877e645bb9d21e8fde3aa0a3cb475b26678 /Jellyfin.Api/Helpers/RequestHelpers.cs
parentd490c1c2bcb2852c9159e8578bc7a60e086e4202 (diff)
parent223b42aed3395f7d01ea513bf352cdf4fd3e7002 (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.cs16
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;
+ }
}
}