mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Correct title ordering for objects without titles (#3244)
* Correct scene title ordering * Correct ordering for other objects * Add basename function, add to gallery title sort
This commit is contained in:
@@ -1019,7 +1019,7 @@ func (qb *ImageStore) setImageSortAndPagination(q *queryBuilder, findFilter *mod
|
||||
case "title":
|
||||
addFilesJoin()
|
||||
addFolderJoin()
|
||||
sortClause = " ORDER BY images.title COLLATE NATURAL_CS " + direction + ", folders.path " + direction + ", files.basename COLLATE NATURAL_CS " + direction
|
||||
sortClause = " ORDER BY COALESCE(images.title, files.basename) COLLATE NATURAL_CS " + direction + ", folders.path " + direction
|
||||
default:
|
||||
sortClause = getSort(sort, direction, "images")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user