Make sort filter queries for name case insensitive (#183)

This commit is contained in:
bnkai
2019-11-16 00:12:47 +02:00
committed by Leopere
parent 9e8d7bb26f
commit a6b8a3f2e8

View File

@@ -114,6 +114,10 @@ func getSort(sort string, direction string, tableName string) string {
} else if tableName == "scene_markers" { } else if tableName == "scene_markers" {
additional = ", scene_markers.scene_id ASC, scene_markers.seconds ASC" additional = ", scene_markers.scene_id ASC, scene_markers.seconds ASC"
} }
if strings.Compare(sort, "name") == 0 {
return " ORDER BY " + colName + " COLLATE NOCASE " + direction + additional
}
return " ORDER BY " + colName + " " + direction + additional return " ORDER BY " + colName + " " + direction + additional
} }
} }