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:
@@ -1109,7 +1109,7 @@ func (qb *GalleryStore) setGallerySort(query *queryBuilder, findFilter *models.F
|
||||
case "title":
|
||||
addFileTable()
|
||||
addFolderTable()
|
||||
query.sortAndPagination += " ORDER BY galleries.title COLLATE NATURAL_CS " + direction + ", folders.path " + direction + ", file_folder.path " + direction + ", files.basename COLLATE NATURAL_CS " + direction
|
||||
query.sortAndPagination += " ORDER BY COALESCE(galleries.title, files.basename, basename(COALESCE(folders.path, ''))) COLLATE NATURAL_CS " + direction + ", file_folder.path " + direction
|
||||
default:
|
||||
query.sortAndPagination += getSort(sort, direction, "galleries")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user