From 8b1d4ccc97373fa6c176394bf0756fff700996f0 Mon Sep 17 00:00:00 2001 From: dogwithakeyboard <128322708+dogwithakeyboard@users.noreply.github.com> Date: Tue, 20 Feb 2024 03:01:27 +0000 Subject: [PATCH] Movie scene sorting (#4588) --- pkg/sqlite/scene.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/sqlite/scene.go b/pkg/sqlite/scene.go index d003121bc..e0e59f498 100644 --- a/pkg/sqlite/scene.go +++ b/pkg/sqlite/scene.go @@ -1549,8 +1549,8 @@ func (qb *SceneStore) setSceneSort(query *queryBuilder, findFilter *models.FindF direction := findFilter.GetDirection() switch sort { case "movie_scene_number": - query.join(moviesScenesTable, "movies_join", "scenes.id = movies_join.scene_id") - query.sortAndPagination += fmt.Sprintf(" ORDER BY movies_join.scene_index %s", getSortDirection(direction)) + query.join(moviesScenesTable, "", "scenes.id = movies_scenes.scene_id") + query.sortAndPagination += getSort("scene_index", direction, moviesScenesTable) case "tag_count": query.sortAndPagination += getCountSort(sceneTable, scenesTagsTable, sceneIDColumn, direction) case "performer_count":