diff --git a/pkg/api/scenes.go b/pkg/api/scenes.go index d1fb546ce..04baf8301 100644 --- a/pkg/api/scenes.go +++ b/pkg/api/scenes.go @@ -325,6 +325,7 @@ func (i SceneResource) getFilters(req *restful.Request, resp *restful.Response) outAttributes = append(outAttributes, "Has Simple Cuepoints") outAttributes = append(outAttributes, "Has HSP Cuepoints") outAttributes = append(outAttributes, "In Trailer List") + outAttributes = append(outAttributes, "Has Preview") outAttributes = append(outAttributes, "Has Subscription") outAttributes = append(outAttributes, "Has Preview") outAttributes = append(outAttributes, "Rating 0") diff --git a/pkg/models/model_scene.go b/pkg/models/model_scene.go index 0456a0459..130876499 100644 --- a/pkg/models/model_scene.go +++ b/pkg/models/model_scene.go @@ -756,6 +756,8 @@ func queryScenes(db *gorm.DB, r RequestSceneList) (*gorm.DB, *gorm.DB) { where = "exists (select 1 from scene_cuepoints where scene_cuepoints.scene_id = scenes.id and track is not null)" case "In Trailer List": where = "trailerlist = 1" + case "Has Preview": + where = "has_video_preview = 1" case "Has Subscription": where = "is_subscribed = 1" case "Has Preview": diff --git a/pkg/scrape/darkroomvr.go b/pkg/scrape/darkroomvr.go index 623093e8b..cbb1b783c 100644 --- a/pkg/scrape/darkroomvr.go +++ b/pkg/scrape/darkroomvr.go @@ -80,20 +80,18 @@ func DarkRoomVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out c sc.Released = tmpDate.Format("YYYY-MM-DD") }) - // Filenames (only a guess for now, according to the sample files) - suffixes := []string{"4k", "5k", "5k10", "6k", "7k", "960p", "1440p", "psvr_1440p"} - base := e.Request.URL.Path - base = strings.TrimPrefix(base, "/video/") - for _, suffix := range suffixes { - sc.Filenames = append(sc.Filenames, "drvr-"+base+"-"+suffix+"_180_LR.mp4") - } - // Scene ID e.ForEach(`a[href*="signup.php?vid"]`, func(id int, e *colly.HTMLElement) { url := e.Attr("href") sc.SiteID = url[strings.LastIndex(url, "=")+1:] }) + // Filenames (only a guess for now, according to the sample files) + suffixes := []string{"4k", "5k", "5k10", "6k", "7k", "960p", "1440p", "psvr_1440p"} + for _, suffix := range suffixes { + sc.Filenames = append(sc.Filenames, "release-"+sc.SiteID+"-"+suffix+".mp4") + } + // trailer details sc.TrailerType = "load_json" params := models.TrailerScrape{SceneUrl: `https://darkroomvr.com/api/vrplayer/video/detail/` + sc.SiteID, RecordPath: "sources", ContentPath: "url", QualityPath: "title"}