Skip to content

Commit

Permalink
has preview attrib
Browse files Browse the repository at this point in the history
added attribute: has preview
  • Loading branch information
theRealKLH committed Sep 10, 2023
1 parent 6c3b100 commit 9312f9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/api/scenes.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ func (i SceneResource) getFilters(req *restful.Request, resp *restful.Response)
outAttributes = append(outAttributes, "Has HSP Cuepoints")
outAttributes = append(outAttributes, "In Trailer List")
outAttributes = append(outAttributes, "Has Subscription")
outAttributes = append(outAttributes, "Has Preview")
outAttributes = append(outAttributes, "Rating 0")
outAttributes = append(outAttributes, "Rating .5")
outAttributes = append(outAttributes, "Rating 1")
Expand Down
2 changes: 2 additions & 0 deletions pkg/models/model_scene.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,8 @@ func queryScenes(db *gorm.DB, r RequestSceneList) (*gorm.DB, *gorm.DB) {
where = "trailerlist = 1"
case "Has Subscription":
where = "is_subscribed = 1"
case "Has Preview":
where = "has_video_preview = 1"
case "Rating":
where = "scenes.star_rating = " + value
case "Cast 6+":
Expand Down

0 comments on commit 9312f9f

Please sign in to comment.