mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Sort tags by name while scraping or merging scenes (#5752)
* Sort tags by name while scraping scenes * TagStore.All should sort by sort_name first * Sort tag by sort name/name in TagIDSelect --------- Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -562,7 +562,7 @@ func (qb *TagStore) All(ctx context.Context) ([]*models.Tag, error) {
|
||||
table := qb.table()
|
||||
|
||||
return qb.getMany(ctx, qb.selectDataset().Order(
|
||||
table.Col("name").Asc(),
|
||||
goqu.L("COALESCE(tags.sort_name, tags.name) COLLATE NATURAL_CI").Asc(),
|
||||
table.Col(idColumn).Asc(),
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user