mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
Restore weird behaviour
This commit is contained in:
parent
d24e7f60c7
commit
f6b293203a
@ -40,10 +40,12 @@ namespace Jellyfin.Api.Helpers
|
||||
result[i] = (sortBy[i], requestedSortOrder[i]);
|
||||
}
|
||||
|
||||
// Add remaining elements with the default SortOrder
|
||||
// Add remaining elements with the first specified SortOrder
|
||||
// or the default one if no SortOrders are specified
|
||||
var order = requestedSortOrder.Count > 0 ? requestedSortOrder[0] : SortOrder.Ascending;
|
||||
for (; i < sortBy.Count; i++)
|
||||
{
|
||||
result[i] = (sortBy[i], SortOrder.Ascending);
|
||||
result[i] = (sortBy[i], order);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -51,7 +51,7 @@ namespace Jellyfin.Api.Tests.Helpers
|
||||
new (string, SortOrder)[]
|
||||
{
|
||||
("SortName", SortOrder.Descending),
|
||||
("ProductionYear", SortOrder.Ascending),
|
||||
("ProductionYear", SortOrder.Descending),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user