mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Autotag optimisation (#2368)
* Add duration to autotag finish message * No sorting scene/image/gallery where not specified * Use an LRU cache for sqlite regexp function * Compile path separator regex once * Cache objects with single letter first names * Move finished auto-tag log * Add more verbose logging * Add new changelog
This commit is contained in:
@@ -486,16 +486,13 @@ func galleryAverageResolutionCriterionHandler(qb *galleryQueryBuilder, resolutio
|
||||
}
|
||||
|
||||
func (qb *galleryQueryBuilder) getGallerySort(findFilter *models.FindFilterType) string {
|
||||
var sort string
|
||||
var direction string
|
||||
if findFilter == nil {
|
||||
sort = "path"
|
||||
direction = "ASC"
|
||||
} else {
|
||||
sort = findFilter.GetSort("path")
|
||||
direction = findFilter.GetDirection()
|
||||
if findFilter == nil || findFilter.Sort == nil || *findFilter.Sort == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
sort := findFilter.GetSort("path")
|
||||
direction := findFilter.GetDirection()
|
||||
|
||||
switch sort {
|
||||
case "images_count":
|
||||
return getCountSort(galleryTable, galleriesImagesTable, galleryIDColumn, direction)
|
||||
|
||||
Reference in New Issue
Block a user