diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-11-20 12:34:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-20 12:34:18 -0500 |
| commit | 7457c4a95d64a798fc4226735f934d20c90a28e2 (patch) | |
| tree | bc829f18ff731302e1c47642ba357fc25c402f68 /Jellyfin.Api/Helpers/RequestHelpers.cs | |
| parent | 799eb4400576efa798f58bed343b888f60676b68 (diff) | |
| parent | 5b62f70bc03afe0d1bce702d71635fe57562dd0c (diff) | |
Merge pull request #4499 from crobibero/more-param
Reduce RequestHelpers.Split usage and remove RequestHelpers.GetGuids
Diffstat (limited to 'Jellyfin.Api/Helpers/RequestHelpers.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/RequestHelpers.cs | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/Jellyfin.Api/Helpers/RequestHelpers.cs b/Jellyfin.Api/Helpers/RequestHelpers.cs index f06f038ab..efce11f8a 100644 --- a/Jellyfin.Api/Helpers/RequestHelpers.cs +++ b/Jellyfin.Api/Helpers/RequestHelpers.cs @@ -122,49 +122,6 @@ 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(); - } - - /// <summary> - /// Gets the item fields. - /// </summary> - /// <param name="fields">The fields string.</param> - /// <returns>IEnumerable{ItemFields}.</returns> - internal static ItemFields[] GetItemFields(string? fields) - { - if (string.IsNullOrEmpty(fields)) - { - return Array.Empty<ItemFields>(); - } - - return Split(fields, ',', true) - .Select(v => - { - if (Enum.TryParse(v, true, out ItemFields value)) - { - return (ItemFields?)value; - } - - return null; - }).Where(i => i.HasValue) - .Select(i => i!.Value) - .ToArray(); - } - internal static QueryResult<BaseItemDto> CreateQueryResult( QueryResult<(BaseItem, ItemCounts)> result, DtoOptions dtoOptions, |
