diff --git a/Jellyfin.Api/Helpers/RequestHelpers.cs b/Jellyfin.Api/Helpers/RequestHelpers.cs index 070711681..299c7d4aa 100644 --- a/Jellyfin.Api/Helpers/RequestHelpers.cs +++ b/Jellyfin.Api/Helpers/RequestHelpers.cs @@ -147,57 +147,6 @@ namespace Jellyfin.Api.Helpers .ToArray(); } - /// - /// Get orderby. - /// - /// Sort by. - /// Sort order. - /// Resulting order by. - internal static ValueTuple[] GetOrderBy(string? sortBy, string? requestedSortOrder) - { - if (string.IsNullOrEmpty(sortBy)) - { - return Array.Empty>(); - } - - var vals = sortBy.Split(','); - if (string.IsNullOrWhiteSpace(requestedSortOrder)) - { - requestedSortOrder = "Ascending"; - } - - var sortOrders = requestedSortOrder.Split(','); - - var result = new ValueTuple[vals.Length]; - - for (var i = 0; i < vals.Length; i++) - { - var sortOrderIndex = sortOrders.Length > i ? i : 0; - - var sortOrderValue = sortOrders.Length > sortOrderIndex ? sortOrders[sortOrderIndex] : null; - var sortOrder = string.Equals(sortOrderValue, "Descending", StringComparison.OrdinalIgnoreCase) - ? SortOrder.Descending - : SortOrder.Ascending; - - result[i] = new ValueTuple(vals[i], sortOrder); - } - - return result; - } - - /// - /// Gets the filters. - /// - /// The filter string. - /// IEnumerable{ItemFilter}. - internal static ItemFilter[] GetFilters(string filters) - { - return string.IsNullOrEmpty(filters) - ? Array.Empty() - : Split(filters, ',', true) - .Select(v => Enum.Parse(v, true)).ToArray(); - } - /// /// Gets the item fields. ///