mirror of
https://github.com/stashapp/stash.git
synced 2025-12-16 20:07:05 +03:00
Add last o sort option (#4626)
This commit is contained in:
@@ -1596,6 +1596,8 @@ func (qb *SceneStore) setSceneSort(query *queryBuilder, findFilter *models.FindF
|
||||
query.sortAndPagination += getCountSort(sceneTable, scenesViewDatesTable, sceneIDColumn, direction)
|
||||
case "last_played_at":
|
||||
query.sortAndPagination += fmt.Sprintf(" ORDER BY (SELECT MAX(view_date) FROM %s AS sort WHERE sort.%s = %s.id) %s", scenesViewDatesTable, sceneIDColumn, sceneTable, getSortDirection(direction))
|
||||
case "last_o_at":
|
||||
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)
|
||||
default:
|
||||
|
||||
@@ -1068,6 +1068,7 @@
|
||||
"interactive": "Interactive",
|
||||
"interactive_speed": "Interactive speed",
|
||||
"isMissing": "Is Missing",
|
||||
"last_o_at": "Last O At",
|
||||
"last_played_at": "Last Played At",
|
||||
"library": "Library",
|
||||
"loading": {
|
||||
|
||||
@@ -42,6 +42,7 @@ const sortByOptions = [
|
||||
"framerate",
|
||||
"bitrate",
|
||||
"last_played_at",
|
||||
"last_o_at",
|
||||
"resume_time",
|
||||
"play_duration",
|
||||
"play_count",
|
||||
|
||||
Reference in New Issue
Block a user