Various bug fixes (#2945)

* Only update fingerprints if changed
* Fix panic when loading primary file fails
* Fix gallery/scene association
* Fix display of scene gallery in card
* Use natural_cs collation with paths for title sorting
This commit is contained in:
WithoutPants
2022-09-25 12:07:55 +10:00
committed by GitHub
parent 4089a5fccc
commit 0848b02e93
11 changed files with 145 additions and 26 deletions

View File

@@ -65,7 +65,7 @@ func getSort(sort string, direction string, tableName string) string {
return " ORDER BY COUNT(distinct " + colName + ") " + direction
case strings.Compare(sort, "filesize") == 0:
colName := getColumn(tableName, "size")
return " ORDER BY cast(" + colName + " as integer) " + direction
return " ORDER BY " + colName + " " + direction
case strings.HasPrefix(sort, randomSeedPrefix):
// seed as a parameter from the UI
// turn the provided seed into a float