Added natural sort for scene and image titles (#943)

* Added natural sort for scene and images
* Use natural sort for movie names

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
JoeSmithStarkers
2020-11-25 20:09:07 +11:00
committed by GitHub
parent 794ea00d37
commit df37ddcc2c
14 changed files with 154 additions and 0 deletions

View File

@@ -173,6 +173,9 @@ func getSort(sort string, direction string, tableName string) string {
if strings.Compare(sort, "name") == 0 {
return " ORDER BY " + colName + " COLLATE NOCASE " + direction + additional
}
if strings.Compare(sort, "title") == 0 {
return " ORDER BY " + colName + " COLLATE NATURAL_CS " + direction + additional
}
return " ORDER BY " + colName + " " + direction + additional
}