Restore weird behaviour

pull/5095/head
Bond_009 4 years ago
parent d24e7f60c7
commit f6b293203a
No known key found for this signature in database
GPG Key ID: 63AB4E6262A96A87

@ -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…
Cancel
Save