Fix sort by movies_scene_number (#1448)

This commit is contained in:
bnkai 2021-05-28 02:01:03 +03:00 committed by GitHub
parent 47ecb9f9b1
commit c5fed1bbdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -673,7 +673,7 @@ func (qb *sceneQueryBuilder) setSceneSort(query *queryBuilder, findFilter *model
direction := findFilter.GetDirection()
switch sort {
case "movie_scene_number":
query.join(moviesScenesTable, "movies_join", "scenes.id")
query.join(moviesScenesTable, "movies_join", "scenes.id = movies_join.scene_id")
query.sortAndPagination += fmt.Sprintf(" ORDER BY movies_join.scene_index %s", getSortDirection(direction))
case "tag_count":
query.sortAndPagination += getCountSort(sceneTable, scenesTagsTable, sceneIDColumn, direction)