mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-21 13:10:45 +02: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]);
|
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++)
|
for (; i < sortBy.Count; i++)
|
||||||
{
|
{
|
||||||
result[i] = (sortBy[i], SortOrder.Ascending);
|
result[i] = (sortBy[i], order);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace Jellyfin.Api.Tests.Helpers
|
||||||
new (string, SortOrder)[]
|
new (string, SortOrder)[]
|
||||||
{
|
{
|
||||||
("SortName", SortOrder.Descending),
|
("SortName", SortOrder.Descending),
|
||||||
("ProductionYear", SortOrder.Ascending),
|
("ProductionYear", SortOrder.Descending),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue