diff options
| author | crobibero <cody@robibe.ro> | 2020-06-25 16:05:15 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-06-25 16:05:15 -0600 |
| commit | 0740ec611211cb121a2ea4f97ab43b92d6411d4d (patch) | |
| tree | bcc5fee8f82e30ebe087966115320dbf66d1fd5c /Jellyfin.Api/Helpers/RequestHelpers.cs | |
| parent | ccd7b3f52435de880158bc41dec9268dc9acbdd5 (diff) | |
| parent | 7bd91727791d5723e779e63b913e8650380048ce (diff) | |
Merge remote-tracking branch 'upstream/api-migration' into api-image-service
Diffstat (limited to 'Jellyfin.Api/Helpers/RequestHelpers.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/RequestHelpers.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Jellyfin.Api/Helpers/RequestHelpers.cs b/Jellyfin.Api/Helpers/RequestHelpers.cs index 2ff40a8a5..446ee716a 100644 --- a/Jellyfin.Api/Helpers/RequestHelpers.cs +++ b/Jellyfin.Api/Helpers/RequestHelpers.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using Jellyfin.Data.Enums; using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Session; @@ -73,5 +74,22 @@ namespace Jellyfin.Api.Helpers return session; } + + /// <summary> + /// Get Guid array from string. + /// </summary> + /// <param name="value">String value.</param> + /// <returns>Guid array.</returns> + internal static Guid[] GetGuids(string? value) + { + if (value == null) + { + return Array.Empty<Guid>(); + } + + return Split(value, ',', true) + .Select(i => new Guid(i)) + .ToArray(); + } } } |
