diff --git a/pkg/models/querybuilder_sql.go b/pkg/models/querybuilder_sql.go index b3f75c2af..686b59e70 100644 --- a/pkg/models/querybuilder_sql.go +++ b/pkg/models/querybuilder_sql.go @@ -114,6 +114,10 @@ func getSort(sort string, direction string, tableName string) string { } else if tableName == "scene_markers" { 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 } }