mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
Filter by Studio (#6155)
This commit is contained in:
parent
a50a0d4289
commit
42f76ca34f
2 changed files with 5 additions and 0 deletions
|
|
@ -1096,6 +1096,7 @@ var sceneSortOptions = sortOptions{
|
|||
"perceptual_similarity",
|
||||
"random",
|
||||
"rating",
|
||||
"studio",
|
||||
"tag_count",
|
||||
"title",
|
||||
"updated_at",
|
||||
|
|
@ -1208,6 +1209,9 @@ func (qb *SceneStore) setSceneSort(query *queryBuilder, findFilter *models.FindF
|
|||
query.sortAndPagination += fmt.Sprintf(" ORDER BY (SELECT MAX(o_date) FROM %s AS sort WHERE sort.%s = %s.id) %s", scenesODatesTable, sceneIDColumn, sceneTable, getSortDirection(direction))
|
||||
case "o_counter":
|
||||
query.sortAndPagination += getCountSort(sceneTable, scenesODatesTable, sceneIDColumn, direction)
|
||||
case "studio":
|
||||
query.join(studioTable, "", "scenes.studio_id = studios.id")
|
||||
query.sortAndPagination += getSort("name", direction, studioTable)
|
||||
default:
|
||||
query.sortAndPagination += getSort(sort, direction, "scenes")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ const sortByOptions = [
|
|||
"interactive",
|
||||
"interactive_speed",
|
||||
"perceptual_similarity",
|
||||
"studio",
|
||||
...MediaSortByOptions,
|
||||
]
|
||||
.map(ListFilterOptions.createSortBy)
|
||||
|
|
|
|||
Loading…
Reference in a new issue