Restore weird behaviour

This commit is contained in:
Bond_009 2021-01-24 17:55:25 +01:00
parent d24e7f60c7
commit f6b293203a
No known key found for this signature in database
GPG key ID: 63AB4E6262A96A87
2 changed files with 5 additions and 3 deletions

View file

@ -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;

View file

@ -51,7 +51,7 @@ namespace Jellyfin.Api.Tests.Helpers
new (string, SortOrder)[]
{
("SortName", SortOrder.Descending),
("ProductionYear", SortOrder.Ascending),
("ProductionYear", SortOrder.Descending),
}
};
}