From 9312f9f21a6281d8945d12307dcd2aa7a353d1bd Mon Sep 17 00:00:00 2001 From: theRealKLH <65736720+theRealKLH@users.noreply.github.com> Date: Sun, 10 Sep 2023 13:13:35 -0400 Subject: [PATCH] has preview attrib added attribute: has preview --- pkg/api/scenes.go | 1 + pkg/models/model_scene.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pkg/api/scenes.go b/pkg/api/scenes.go index 75c79ef5f..d1fb546ce 100644 --- a/pkg/api/scenes.go +++ b/pkg/api/scenes.go @@ -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") diff --git a/pkg/models/model_scene.go b/pkg/models/model_scene.go index 623d7cd8a..0456a0459 100644 --- a/pkg/models/model_scene.go +++ b/pkg/models/model_scene.go @@ -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+":