Skip to content

Commit

Permalink
Sort by Site
Browse files Browse the repository at this point in the history
  • Loading branch information
toshski committed Jul 24, 2024
1 parent 2f4d462 commit 4d92cc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/models/model_scene.go
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,8 @@ func queryScenes(db *gorm.DB, r RequestSceneList) (*gorm.DB, *gorm.DB) {
}
case "scene_id_desc":
tx = tx.Order("scene_id desc")
case "site_asc":
tx = tx.Order("scenes.site")
case "random":
if dbConn.Driver == "mysql" {
tx = tx.Order("rand()")
Expand Down
1 change: 1 addition & 0 deletions ui/src/views/scenes/Filters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<option value="last_opened_asc">↑ {{ $t("Last viewed date") }}</option>
<option value="script_published_desc">↓ {{ $t("Published Script Added") }}</option>
<option value="scene_id_desc">↓ {{ $t("Scene Id") }}</option>
<option value="site_asc">↑ {{ $t("Site") }}</option>
<option value="alt_src_desc">↓ {{ $t("Linked to Alternate Sites") }}</option>
<option value="random">↯ {{ $t("Random") }}</option>
</select>
Expand Down

0 comments on commit 4d92cc3

Please sign in to comment.