[Files refactor] Bug fixes (#2849)

* Fix scene sorting
* Fix folder-based gallery path sorting
* Fix gallery path filter
* Fix stash-box performer submission
* Fix identify logging
* Remove govet from linter
This commit is contained in:
WithoutPants
2022-08-24 16:37:20 +10:00
parent 00608c167a
commit f4825fadf4
8 changed files with 159 additions and 91 deletions

View File

@@ -105,7 +105,7 @@ func getCountSort(primaryTable, joinTable, primaryFK, direction string) string {
return fmt.Sprintf(" ORDER BY (SELECT COUNT(*) FROM %s WHERE %s = %s.id) %s", joinTable, primaryFK, primaryTable, getSortDirection(direction))
}
func getSearchBinding(columns []string, q string, not bool) (string, []interface{}) {
func getStringSearchClause(columns []string, q string, not bool) sqlClause {
var likeClauses []string
var args []interface{}
@@ -137,7 +137,7 @@ func getSearchBinding(columns []string, q string, not bool) (string, []interface
}
likes := strings.Join(likeClauses, binaryType)
return "(" + likes + ")", args
return makeClause("("+likes+")", args...)
}
func getInBinding(length int) string {