Skip to content

Commit

Permalink
Merge branch 'xbapps:master' into util
Browse files Browse the repository at this point in the history
  • Loading branch information
theRealKLH authored Feb 15, 2024
2 parents 527ef91 + 74859c1 commit 85b8dcc
Show file tree
Hide file tree
Showing 17 changed files with 212 additions and 97 deletions.
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ require (
github.com/lucasb-eyer/go-colorful v1.2.0
github.com/marcsauter/single v0.0.0-20201009143647-9f8d81240be2
github.com/markphelps/optional v0.11.0
github.com/mattn/go-sqlite3 v1.14.19
github.com/mattn/go-sqlite3 v1.14.22
github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2
github.com/mholt/archiver v3.1.1+incompatible
github.com/mozillazg/go-slugify v0.2.0
Expand All @@ -55,10 +55,10 @@ require (
github.com/tidwall/gjson v1.17.0
github.com/x-cray/logrus-prefixed-formatter v0.5.2
github.com/xo/dburl v0.21.1
golang.org/x/crypto v0.18.0
golang.org/x/net v0.20.0
golang.org/x/oauth2 v0.16.0
golang.org/x/sys v0.16.0
golang.org/x/crypto v0.19.0
golang.org/x/net v0.21.0
golang.org/x/oauth2 v0.17.0
golang.org/x/sys v0.17.0
golang.org/x/text v0.14.0
gopkg.in/gormigrate.v1 v1.6.0
willnorris.com/go/imageproxy v0.11.3-0.20231113231555-ef50c1f9a64e
Expand Down Expand Up @@ -145,7 +145,7 @@ require (
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
golang.org/x/image v0.10.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/term v0.17.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/sourcemap.v1 v1.0.5 // indirect
Expand Down
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsO
github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI=
github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2 h1:YocNLcTBdEdvY3iDK6jfWXvEaM5OCKkjxPKoJRdB3Gg=
Expand Down Expand Up @@ -387,6 +389,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.10.0 h1:gXjUUtwtx5yOE0VKWq1CH4IJAClq4UGgUA3i+rpON9M=
Expand Down Expand Up @@ -421,10 +425,14 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.2.0/go.mod h1:Cwn6afJ8jrQwYMxQDTpISoXmXW9I6qF6vDeuuoX3Ibs=
golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ=
golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o=
golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ=
golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -453,6 +461,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
Expand All @@ -461,6 +471,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@fortawesome/fontawesome-free": "5.15.4",
"@fortawesome/fontawesome-svg-core": "1.2.36",
"@mdi/font": "7.4.47",
"buefy": "0.9.27",
"buefy": "0.9.28",
"bulma-extensions": "6.2.7",
"date-fns": "3.3.1",
"ky": "0.30.0",
Expand All @@ -35,8 +35,8 @@
"wampy": "6.4.2"
},
"devDependencies": {
"@babel/core": "7.23.7",
"@babel/eslint-parser": "7.23.3",
"@babel/core": "7.23.9",
"@babel/eslint-parser": "7.23.10",
"@vue/cli-plugin-babel": "5.0.8",
"@vue/cli-plugin-eslint": "5.0.8",
"@vue/cli-service": "5.0.8",
Expand All @@ -48,16 +48,16 @@
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-standard": "4.1.0",
"eslint-plugin-vue": "9.20.1",
"eslint-plugin-vue": "9.21.1",
"less": "4.2.0",
"less-loader": "12.1.0",
"less-loader": "12.2.0",
"sass": "1.70.0",
"sass-loader": "14.0.0",
"sass-loader": "14.1.0",
"simple-progress-webpack-plugin": "2.0.0",
"vue-cli-plugin-i18n": "2.3.2",
"vue-i18n-extract": "2.0.7",
"vue-template-compiler": "2.7.16",
"webpack": "5.90.0"
"webpack": "5.90.1"
},
"eslintConfig": {
"root": true,
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/scenes.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ func (i SceneResource) getFilters(req *restful.Request, resp *restful.Response)
outAttributes = append(outAttributes, "Cast 4")
outAttributes = append(outAttributes, "Cast 5")
outAttributes = append(outAttributes, "Cast 6+")
outAttributes = append(outAttributes, "No Actor/Cast")
outAttributes = append(outAttributes, "Flat video")
outAttributes = append(outAttributes, "FOV: 180°")
outAttributes = append(outAttributes, "FOV: 190°")
Expand Down Expand Up @@ -390,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
5 changes: 4 additions & 1 deletion pkg/externalreference/stashdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ func UpdateXbvrActor(performer models.StashPerformer, xbvrActorID uint) {

changed := false
actor := models.Actor{ID: xbvrActorID}
db.Where(&actor).First(&actor)
err := db.Where(&actor).First(&actor).Error
if err != nil {
return
}

if len(performer.Images) > 0 {
if actor.ImageUrl != performer.Images[0].URL && !actor.CheckForSetImage() {
Expand Down
4 changes: 3 additions & 1 deletion pkg/migrations/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -760,10 +760,12 @@ func Migrate() {
ID: "0073-scene-_id-index-plus-columns_size_changes",
Migrate: func(tx *gorm.DB) error {
type Scene struct {
SceneID string `gorm:"index" json:"scene_id" xbvrbackup:"scene_id"`
CoverURL string `gorm:"size:500" json:"cover_url" xbvrbackup:"cover_url"`
SceneURL string `gorm:"size:500" json:"scene_url" xbvrbackup:"scene_url"`
}

sql := `CREATE INDEX idx_scenes_scene_id ON scenes (scene_id)`
tx.Exec(sql)
return tx.AutoMigrate(&Scene{}).Error
},
},
Expand Down
4 changes: 4 additions & 0 deletions pkg/models/model_scene.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,8 @@ func queryScenes(db *gorm.DB, r RequestSceneList) (*gorm.DB, *gorm.DB) {
where = "is_subscribed = 1"
case "Rating":
where = "scenes.star_rating = " + value
case "No Actor/Cast":
where = "exists (select 1 from scenes s left join scene_cast sc on sc.scene_id =s.id where s.id=scenes.id and sc.scene_id is NULL)"
case "Cast 6+":
where = "exists (select 1 from scene_cast join actors on actors.id = scene_cast.actor_id where scene_cast.scene_id = scenes.id and actors.name not like 'aka:%' group by scene_cast.scene_id having count(*) > 5)"
case "Cast 1", "Cast 2", "Cast 3", "Cast 4", "Cast 5":
Expand Down Expand Up @@ -913,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
18 changes: 17 additions & 1 deletion pkg/scrape/badoink.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ func BadoinkSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out

commonDb, _ := models.GetCommonDB()

var Has6K7K bool = false

sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
sc.ScraperID = scraperID
Expand Down Expand Up @@ -79,6 +81,9 @@ func BadoinkSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
// Tags
e.ForEach(`a.video-tag`, func(id int, e *colly.HTMLElement) {
sc.Tags = append(sc.Tags, strings.TrimSpace(e.Text))
if strings.Contains(strings.TrimSpace(e.Text), "7K") {
Has6K7K = true
}
})
if scraperID == "vrcosplayx" {
sc.Tags = append(sc.Tags, "Cosplay", "Parody")
Expand Down Expand Up @@ -143,7 +148,18 @@ func BadoinkSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
fragmentName := strings.Split(fpName, "/")
baseName := fragmentName[len(fragmentName)-1]

filenames := []string{"samsung_180_180x180_3dh", "oculus_180_180x180_3dh", "mobile_180_180x180_3dh", "7k_180_180x180_3dh", "5k_180_180x180_3dh", "4k_HEVC_180_180x180_3dh", "samsung_180_180x180_3dh_LR", "oculus_180_180x180_3dh_LR", "mobile_180_180x180_3dh_LR", "7k_180_180x180_3dh_LR", "5k_180_180x180_3dh_LR", "4k_HEVC_180_180x180_3dh_LR", "ps4_180_sbs", "ps4_pro_180_sbs"}
e.ForEach(`a.video-tag`, func(id int, e *colly.HTMLElement) {
sc.Tags = append(sc.Tags, strings.TrimSpace(e.Text))
if strings.Contains(strings.TrimSpace(e.Text), "7K") {
Has6K7K = true
}
})

filenames := []string{"samsung_180_180x180_3dh", "oculus_180_180x180_3dh", "mobile_180_180x180_3dh", "5k_180_180x180_3dh", "4k_HEVC_180_180x180_3dh", "samsung_180_180x180_3dh_LR", "oculus_180_180x180_3dh_LR", "mobile_180_180x180_3dh_LR", "5k_180_180x180_3dh_LR", "4k_HEVC_180_180x180_3dh_LR", "ps4_180_sbs", "ps4_pro_180_sbs"}

if Has6K7K {
filenames = []string{"7k_180_180x180_3dh", "6k_180_180x180_3dh", "5k_180_180x180_3dh", "4k_HEVC_180_180x180_3dh", "7k_180_180x180_3dh_LR", "6k_180_180x180_3dh_LR", "5k_180_180x180_3dh_LR", "4k_HEVC_180_180x180_3dh_LR", "samsung_180_180x180_3dh", "oculus_180_180x180_3dh", "mobile_180_180x180_3dh", "samsung_180_180x180_3dh_LR", "oculus_180_180x180_3dh_LR", "mobile_180_180x180_3dh_LR", "ps4_180_sbs", "ps4_pro_180_sbs"}
}

for i := range filenames {
filenames[i] = baseName + "_" + filenames[i] + ".mp4"
Expand Down
4 changes: 4 additions & 0 deletions pkg/scrape/povr.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ func addPOVRScraper(id string, name string, company string, avatarURL string, cu
} else {
suffixedName += " (POVR)"
}
if avatarURL == "" {
avatarURL = "https://images.povr.com/img/povr/android-icon-192x192.png"
}

if masterSiteId == "" {
registerScraper(id, suffixedName, avatarURL, "povr.com", func(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, singleSceneURL string, singeScrapeAdditionalInfo string, limitScraping bool) error {
return POVR(wg, updateSite, knownScenes, out, singleSceneURL, id, siteNameSuffix, company, siteURL, singeScrapeAdditionalInfo, limitScraping, "")
Expand Down
72 changes: 54 additions & 18 deletions pkg/scrape/slrstudios.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ import (
"github.com/xbapps/xbvr/pkg/models"
)

func absolutegallery(match string) string {
re := regexp.MustCompile(`(https:\/\/cdn-vr\.(sexlikereal|trannypornvr)\.com\/images\/\d+\/)vr-porn-[\w\-]+?-(\d+)-original(\.webp|\.jpg)`)
submatches := re.FindStringSubmatch(match)
if len(submatches) == 0 {
return match // no match, return original string
}
return submatches[1] + submatches[3] + "_o.jpg" // construct new string with desired format
}

func SexLikeReal(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, singleSceneURL string, scraperID string, siteID string, company string, siteURL string, singeScrapeAdditionalInfo string, limitScraping bool, masterSiteId string) error {
defer wg.Done()
logScrapeStart(scraperID, siteID)
Expand Down Expand Up @@ -64,24 +73,6 @@ func SexLikeReal(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
sc.SiteID = tmp[len(tmp)-1]
sc.SceneID = "slr-" + sc.SiteID

// Cover
coverURL := e.ChildAttr(`.splash-screen > img`, "src")
if len(coverURL) > 0 {
sc.Covers = append(sc.Covers, coverURL)
} else {
m := coverRegEx.FindStringSubmatch(strings.TrimSpace(e.ChildAttr(`.c-webxr-splash-screen`, "style")))
if len(m) > 0 && len(m[1]) > 0 {
sc.Covers = append(sc.Covers, m[1])
}
}

// Gallery
e.ForEach(`meta[name^="twitter:image"]`, func(id int, e *colly.HTMLElement) {
if e.Attr("name") != "twitter:image" { // we need image1, image2...
sc.Gallery = append(sc.Gallery, e.Request.AbsoluteURL(e.Attr("content")))
}
})

// Synopsis
sc.Synopsis = strings.TrimSpace(
e.DOM.Find(`div#tabs-about > div > div.u-px--four > div.u-wh`).First().Text())
Expand Down Expand Up @@ -139,6 +130,51 @@ func SexLikeReal(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out

isTransScene := e.Request.Ctx.GetAny("isTransScene").(bool)

// Gallery
e.ForEach(`meta[name^="twitter:image"]`, func(id int, e *colly.HTMLElement) {
re := regexp.MustCompile(`(https:\/\/cdn-vr\.(sexlikereal|trannypornvr)\.com\/images\/\d+\/)vr-porn-[\w\-]+?-(\d+)-original(\.webp|\.jpg)`)
if e.Attr("name") != "twitter:image" { // we need image1, image2...
if !isTransScene {
sc.Gallery = append(sc.Gallery, re.ReplaceAllStringFunc(e.Request.AbsoluteURL(e.Attr("content")), absolutegallery))
} //else {
// sc.Gallery = append(sc.Gallery, e.Request.AbsoluteURL(e.Attr("content")))
//}
// Trans scenes currently do not scrape gallery images at all
// I'm not sure how to, since we're using "twitter:image" and there are none for trans scenes
// The URLs are available on the "Photos" tab and they can be re-written to redirect to original images similarly
// The RegEx will work for either
// i.e. "https://cdn-vr.trannypornvr.com/images/861/vr-porn-Welcome-Back-4570.webp" -> "https://cdn-vr.trannypornvr.com/images/861/4570_o.jpg"
}
})

// Cover
if !isTransScene {
coverURL := strings.Replace(gjson.Get(JsonMetadataA, "thumbnailUrl").String(), "app", "desktop", -1)
if len(coverURL) > 0 {
sc.Covers = append(sc.Covers, coverURL)
} else {
coverURL := e.ChildAttr(`.splash-screen > img`, "src")
if len(coverURL) > 0 {
sc.Covers = append(sc.Covers, coverURL)
} else {
m := coverRegEx.FindStringSubmatch(strings.TrimSpace(e.ChildAttr(`.c-webxr-splash-screen`, "style")))
if len(m) > 0 && len(m[1]) > 0 {
sc.Covers = append(sc.Covers, m[1])
}
}
}
} else {
tcoverURL := e.ChildAttr(`.splash-screen > img`, "src")
if len(tcoverURL) > 0 {
sc.Covers = append(sc.Covers, tcoverURL)
} else {
m := coverRegEx.FindStringSubmatch(strings.TrimSpace(e.ChildAttr(`.c-webxr-splash-screen`, "style")))
if len(m) > 0 && len(m[1]) > 0 {
sc.Covers = append(sc.Covers, m[1])
}
}
}

// straight and trans videos use a different page structure
if !isTransScene {
// Extract from JSON meta data
Expand Down
4 changes: 4 additions & 0 deletions pkg/scrape/vrporn.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ func addVRPornScraper(id string, name string, company string, avatarURL string,
} else {
suffixedName += " (VRPorn)"
}
if avatarURL == "" {
avatarURL = "https://vrporn.com/assets/favicon.png"
}

if masterSiteId == "" {
registerScraper(id, suffixedName, avatarURL, "vrporn.com", func(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, singleSceneURL string, singeScrapeAdditionalInfo string, limitScraping bool) error {
return VRPorn(wg, updateSite, knownScenes, out, singleSceneURL, id, siteNameSuffix, company, siteURL, singeScrapeAdditionalInfo, limitScraping, "")
Expand Down
2 changes: 1 addition & 1 deletion ui/src/locales/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
"Upper Search Range":"Upper Search Range",
"Alternate Sites":"Alternate Sites",
"Main Site":"Main Site",
"Scenes from Akternate Sites will be matched after Scene Scraping":"Scenes from Akternate Sites will be matched after Scene Scraping",
"Scenes from Alternate Sites will be matched after Scene Scraping":"Scenes from Alternate Sites will be matched after Scene Scraping",
"If a file is not matched to a scene, then try scenes from Alternate Sites":"If a file is not matched to a scene, then try scenes from Alternate Sites",
"When filtering for Scenes with Scripts or sorting by Script Published Date, scenes from Alternate Sites will be included. Note: Slows these queries":"When filtering for Scenes with Scripts or sorting by Script Published Date, scenes from Alternate Sites will be included. Note: Slows these queries",
"Remove Scene Links":"Remove Scene Links",
Expand Down
5 changes: 4 additions & 1 deletion ui/src/store/sceneList.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ const actions = {
q.limit = state.limit

const data = await ky
.post('/api/scene/list', { json: q })
.post('/api/scene/list', {
json: q,
timeout: 6e6
})
.json()

state.isLoading = false
Expand Down
2 changes: 1 addition & 1 deletion ui/src/views/options/sections/InterfaceAdvanced.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<div class="column">
<section>
<b-field>
<b-tooltip :label="$t('Scenes from Akternate Sites will be matched after Scene Scraping')" :delay="500">
<b-tooltip :label="$t('Scenes from Alternate Sites will be matched after Scene Scraping')" :delay="500">
<b-switch v-model="linkScenesAfterSceneScraping" type="is-default">
Link Scenes after Scene Scraping
</b-switch>
Expand Down
Loading

0 comments on commit 85b8dcc

Please sign in to comment.