Fix movies sorting, scene studio editing (#1478)

* Fix movies:sort_by->scenes_count, scene:edit->remove studio
This commit is contained in:
bnkai
2021-06-04 02:21:17 +03:00
committed by GitHub
parent 2ce4d9f0d8
commit ad0a9d0707
6 changed files with 40 additions and 9 deletions

View File

@@ -210,12 +210,14 @@ func (qb *movieQueryBuilder) getMovieSort(findFilter *models.FindFilterType) str
direction = findFilter.GetDirection()
}
// #943 - override name sorting to use natural sort
if sort == "name" {
switch sort {
case "name": // #943 - override name sorting to use natural sort
return " ORDER BY " + getColumn("movies", sort) + " COLLATE NATURAL_CS " + direction
case "scenes_count": // generic getSort won't work for this
return getCountSort(movieTable, moviesScenesTable, movieIDColumn, direction)
default:
return getSort(sort, direction, "movies")
}
return getSort(sort, direction, "movies")
}
func (qb *movieQueryBuilder) queryMovie(query string, args []interface{}) (*models.Movie, error) {