1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-26 01:37:07 +00:00

Sort search input by sortTitle

This commit is contained in:
Mark McDowall 2019-02-06 19:22:45 -08:00
parent 102b8afd66
commit a29b1259b5

View file

@ -50,6 +50,7 @@ function createCleanSeriesSelector() {
alternateTitles: alternateTitles.map((alternateTitle) => {
return {
title: alternateTitle.title,
sortTitle: alternateTitle.sortTitle,
cleanTitle: jdu.replace(alternateTitle.title).toLowerCase()
};
}),
@ -58,10 +59,10 @@ function createCleanSeriesSelector() {
})
};
}).sort((a, b) => {
if (a.cleanTitle < b.cleanTitle) {
if (a.sortTitle < b.sortTitle) {
return -1;
}
if (a.cleanTitle > b.cleanTitle) {
if (a.sortTitle > b.sortTitle) {
return 1;
}