Skip to content

Commit

Permalink
feat: Multiple Scenes Available at an Alternate Site (xbapps#1621)
Browse files Browse the repository at this point in the history
  • Loading branch information
toshski authored Feb 12, 2024
1 parent f1fb7c9 commit 97b7ec2
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 @@ -391,6 +391,7 @@ func (i SceneResource) getFilters(req *restful.Request, resp *restful.Response)
outAttributes = append(outAttributes, "Available from POVR")
outAttributes = append(outAttributes, "Available from VRPorn")
outAttributes = append(outAttributes, "Available from SLR")
outAttributes = append(outAttributes, "Multiple Scenes Available at an Alternate Site")
type Results struct {
Result string
}
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 @@ -915,6 +915,8 @@ func queryScenes(db *gorm.DB, r RequestSceneList) (*gorm.DB, *gorm.DB) {
where = "exists (select 1 from external_reference_links where external_source like 'alternate scene %' and external_id like 'slr-%' and internal_db_id = scenes.id)"
case "Available from Alternate Sites":
where = "exists (select 1 from external_reference_links where external_source like 'alternate scene %' and internal_db_id = scenes.id)"
case "Multiple Scenes Available at an Alternate Site":
where = "exists (select 1 from external_reference_links where external_source like 'alternate scene %' and internal_db_id = scenes.id group by external_source having count(*)>1)"
}

if negate {
Expand Down

0 comments on commit 97b7ec2

Please sign in to comment.