diff --git a/pkg/api/scenes.go b/pkg/api/scenes.go
index 9f090d149..80928cfaa 100644
--- a/pkg/api/scenes.go
+++ b/pkg/api/scenes.go
@@ -340,6 +340,10 @@ func (i SceneResource) getFilters(req *restful.Request, resp *restful.Response)
outAttributes = append(outAttributes, "MKX200")
outAttributes = append(outAttributes, "MKX220")
outAttributes = append(outAttributes, "VRCA220")
+ outAttributes = append(outAttributes, "POVR Scraper")
+ outAttributes = append(outAttributes, "SLR Scraper")
+ outAttributes = append(outAttributes, "VRPHub Scraper")
+ outAttributes = append(outAttributes, "VRPorn Scraper")
type Results struct {
Result string
}
diff --git a/pkg/api/tasks.go b/pkg/api/tasks.go
index b4de85007..acda4b2bb 100644
--- a/pkg/api/tasks.go
+++ b/pkg/api/tasks.go
@@ -120,6 +120,7 @@ func (i TaskResource) exportNewFunscripts(req *restful.Request, resp *restful.Re
func (i TaskResource) backupBundle(req *restful.Request, resp *restful.Response) {
inclAllSites, _ := strconv.ParseBool(req.QueryParameter("allSites"))
+ onlyIncludeOfficalSites, _ := strconv.ParseBool(req.QueryParameter("onlyIncludeOfficalSites"))
inclScenes, _ := strconv.ParseBool(req.QueryParameter("inclScenes"))
inclFileLinks, _ := strconv.ParseBool(req.QueryParameter("inclLinks"))
inclCuepoints, _ := strconv.ParseBool(req.QueryParameter("inclCuepoints"))
@@ -132,7 +133,7 @@ func (i TaskResource) backupBundle(req *restful.Request, resp *restful.Response)
playlistId := req.QueryParameter("playlistId")
download := req.QueryParameter("download")
- bundle := tasks.BackupBundle(inclAllSites, inclScenes, inclFileLinks, inclCuepoints, inclHistory, inclPlaylists, inclActorAkas, inclVolumes, inclSites, inclActions, playlistId)
+ bundle := tasks.BackupBundle(inclAllSites, onlyIncludeOfficalSites, inclScenes, inclFileLinks, inclCuepoints, inclHistory, inclPlaylists, inclActorAkas, inclVolumes, inclSites, inclActions, playlistId, "", "")
if download == "true" {
resp.WriteHeaderAndEntity(http.StatusOK, ResponseBackupBundle{Response: "Ready to Download from http://xxx.xxx.xxx.xxx:9999/download/xbvr-content-bundle.json"})
} else {
diff --git a/pkg/config/scraper_list.go b/pkg/config/scraper_list.go
new file mode 100644
index 000000000..07c73e850
--- /dev/null
+++ b/pkg/config/scraper_list.go
@@ -0,0 +1,159 @@
+package config
+
+import (
+ _ "embed"
+ "encoding/json"
+ "io/ioutil"
+ "os"
+ "path/filepath"
+ "strings"
+ "sync"
+
+ "github.com/xbapps/xbvr/pkg/common"
+ "github.com/xbapps/xbvr/pkg/models"
+)
+
+//go:embed scrapers.json
+var officalList []byte
+
+type ScraperList struct {
+ Warnings []string `json:"warning"`
+ CustomScrapers CustomScrapers `json:"custom"`
+ XbvrScrapers XbvrScrapers `json:"xbvr"`
+}
+type XbvrScrapers struct {
+ PovrScrapers []ScraperConfig `json:"povr"`
+ SlrScrapers []ScraperConfig `json:"slr"`
+ VrpornScrapers []ScraperConfig `json:"vrporn"`
+ VrphubScrapers []ScraperConfig `json:"vrphub"`
+}
+type CustomScrapers struct {
+ PovrScrapers []ScraperConfig `json:"povr"`
+ SlrScrapers []ScraperConfig `json:"slr"`
+ VrpornScrapers []ScraperConfig `json:"vrporn"`
+ VrphubScrapers []ScraperConfig `json:"vrphub"`
+}
+type ScraperConfig struct {
+ ID string `json:"-"`
+ URL string `json:"url"`
+ Name string `json:"name"`
+ Company string `json:"company"`
+ AvatarUrl string `json:"avatar_url"`
+ FileID string `json:"id,omitempty"`
+}
+
+var loadLock sync.Mutex
+
+func (o *ScraperList) Load() error {
+ loadLock.Lock()
+ defer loadLock.Unlock()
+
+ // load standard scraper config embeded in distribution
+ var officalScrapers ScraperList
+ json.Unmarshal(officalList, &officalScrapers)
+
+ fName := filepath.Join(common.AppDir, "scrapers.json")
+ if _, err := os.Stat(fName); os.IsNotExist(err) {
+ list, _ := json.MarshalIndent(officalScrapers, "", " ")
+ ioutil.WriteFile(fName, list, 0644)
+ return nil
+ } else {
+ b, err := ioutil.ReadFile(fName)
+ if err != nil {
+ o.XbvrScrapers = officalScrapers.XbvrScrapers
+ return err
+ }
+ json.Unmarshal(b, &o)
+ }
+
+ // overwrite the local files offical list
+ o.XbvrScrapers = officalScrapers.XbvrScrapers
+ o.Warnings = officalScrapers.Warnings
+
+ SetSiteId(&o.XbvrScrapers.PovrScrapers, "")
+ SetSiteId(&o.XbvrScrapers.SlrScrapers, "")
+ SetSiteId(&o.XbvrScrapers.VrphubScrapers, "")
+ SetSiteId(&o.XbvrScrapers.VrpornScrapers, "")
+ SetSiteId(&o.CustomScrapers.PovrScrapers, "povr")
+ SetSiteId(&o.CustomScrapers.SlrScrapers, "slr")
+ SetSiteId(&o.CustomScrapers.VrphubScrapers, "vrphub")
+ SetSiteId(&o.CustomScrapers.VrpornScrapers, "vrporn")
+
+ // remove custom sites that are now offical for the same aggregation site
+ o.CustomScrapers.PovrScrapers = RemoveCustomListNowOffical(o.CustomScrapers.PovrScrapers, o.XbvrScrapers.PovrScrapers)
+ o.CustomScrapers.SlrScrapers = RemoveCustomListNowOffical(o.CustomScrapers.SlrScrapers, o.XbvrScrapers.SlrScrapers)
+ o.CustomScrapers.VrphubScrapers = RemoveCustomListNowOffical(o.CustomScrapers.VrphubScrapers, o.XbvrScrapers.VrphubScrapers)
+ o.CustomScrapers.VrpornScrapers = RemoveCustomListNowOffical(o.CustomScrapers.VrpornScrapers, o.XbvrScrapers.VrpornScrapers)
+
+ list, err := json.MarshalIndent(o, "", " ")
+ if err == nil {
+ ioutil.WriteFile(fName, list, 0644)
+ }
+
+ return nil
+}
+
+func RemoveCustomListNowOffical(customSiteList []ScraperConfig, officalSiteList []ScraperConfig) []ScraperConfig {
+ newList := []ScraperConfig{}
+ for _, customSite := range customSiteList {
+ if !CheckMatchingSite(customSite, officalSiteList) {
+ newList = append(newList, customSite)
+ } else {
+ db, _ := models.GetDB()
+ defer db.Close()
+ db.Model(&models.Scene{}).Where("scraper_id = ?", customSite.ID).Update("needs_update", true)
+ db.Delete(&models.Site{ID: customSite.ID})
+ common.Log.Infof("Studio %s is now an offical Studio and has been shifted from your custom list. Enable the offical scraper and run it to update existing scenes", customSite.Name)
+ }
+ }
+ return newList
+}
+
+func CheckMatchingSite(findSite ScraperConfig, searchList []ScraperConfig) bool {
+ for _, customSite := range searchList {
+ s1 := strings.ToLower(customSite.URL)
+ s2 := strings.ToLower(findSite.URL)
+ if !strings.HasSuffix(s1, "/") {
+ s1 += "/"
+ }
+ if !strings.HasSuffix(s2, "/") {
+ s2 += "/"
+ }
+ if s1 == s2 {
+ return true
+ }
+ }
+ return false
+}
+func GetMatchingSite(findSite ScraperConfig, searchList []ScraperConfig) ScraperConfig {
+ for _, site := range searchList {
+ if findSite.URL == site.URL {
+ return site
+ }
+ }
+ return ScraperConfig{}
+}
+func CheckMatchingSiteID(findSite ScraperConfig, searchList []ScraperConfig) bool {
+ for _, customSite := range searchList {
+ if findSite.ID == customSite.ID {
+ return true
+ }
+ }
+ return false
+}
+
+func SetSiteId(configList *[]ScraperConfig, customId string) {
+ for idx, siteconfig := range *configList {
+ if siteconfig.FileID == "" || customId != "" {
+ id := strings.TrimRight(siteconfig.URL, "/")
+ siteconfig.ID = strings.ToLower(id[strings.LastIndex(id, "/")+1:])
+ } else {
+ siteconfig.ID = strings.ToLower(siteconfig.FileID)
+ }
+ if customId != "" {
+ siteconfig.ID = strings.ToLower(siteconfig.ID + "-" + customId)
+ }
+ (*configList)[idx] = siteconfig
+ }
+
+}
diff --git a/pkg/config/scrapers.json b/pkg/config/scrapers.json
new file mode 100644
index 000000000..615076887
--- /dev/null
+++ b/pkg/config/scrapers.json
@@ -0,0 +1,528 @@
+{
+ "warning": [
+ "Do not alter the xbvr offical list, it is provided for your reference only and changing it will have no effect", "",
+ "Make a backup of scrapers.json before making changes. If you get it wrong you may lose your custom sites. Trust me make a backup.", "",
+ "Using custom studio lists may require scenes to be delete and recanned when available in an offical list, if a different aggregation studio was used, eg VRPorn vs SLR",
+ "Do Not Share,Export,Import Scenes data from Custom Studios with others","",
+ "To change the name in a custom list, first flag all scenes to be updated (do not rescan yet), change the name, restart xbvr, rescan studio","",
+ "If a studio in the custom list becomes offical, it will be removed from the custom list, if it is for the same agrregator. If it is different, you can continue to your preferred site or delete all scenes to change to the offical one","","",
+ "Company is optional","",
+ "Did you remember to make a backup of scrapers.json before making changes"
+ ],
+ "custom": {
+ "povr": [],
+ "slr": [],
+ "vrporn": [],
+ "vrphub": []
+ },
+ "xbvr": {
+ "povr": [
+ {
+ "url": "https://povr.com/povr-originals",
+ "name": "POVR Originals",
+ "company": "POVR.COM",
+ "avatar_url": "https://images.povr.com/img/povr/android-icon-192x192.png"
+ },
+ {
+ "url": "https://povr.com/wankzvr",
+ "name": "WankzVR",
+ "company": "POVR.COM",
+ "avatar_url": "https://images.povr.com/assets/logos/channels/0/2/2627/200.svg"
+ },
+ {
+ "url": "https://povr.com/milfvr",
+ "name": "MilfVR",
+ "company": "POVR.COM",
+ "avatar_url": "https://images.povr.com/assets/logos/channels/0/2/2965/200.svg"
+ },
+ {
+ "url": "https://povr.com/herpovr",
+ "name": "herPOVR",
+ "company": "POVR.COM",
+ "avatar_url": "https://images.povr.com/img/povr/android-icon-192x192.png"
+ },
+ {
+ "url": "https://povr.com/brasilvr",
+ "name": "BrasilVR",
+ "company": "BrasilVR",
+ "avatar_url": "https://images.povr.com/assets/logos/channels/0/4/4145/200.svg"
+ },
+ {
+ "url": "https://povr.com/tranzvr",
+ "name": "TranzVR",
+ "company": "POVR.COM",
+ "avatar_url": "https://images.povr.com/assets/logos/channels/0/3/3245/200.svg"
+ }
+ ],
+ "slr": [
+ {
+ "url": "https://www.sexlikereal.com/studios/slr-originals",
+ "name": "SLR Originals",
+ "company": "SexLikeReal",
+ "avatar_url": "https://www.sexlikereal.com/s/refactor/images/favicons/android-icon-192x192.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/slr-jav-originals",
+ "name": "SLR JAV Originals",
+ "company": "SexLikeReal",
+ "avatar_url": "https://www.sexlikereal.com/s/refactor/images/favicons/android-icon-192x192.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/amateurcouplesvr",
+ "name": "AmateurCouplesVR",
+ "company": "AmateurCouplesVR",
+ "avatar_url": "https://www.sexlikereal.com/s/images/content/sexlikereal.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/amateurvr3d",
+ "name": "AmateurVR3D",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/amorevr",
+ "name": "AmoreVR",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/astrodomina",
+ "name": "AstroDomina",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/blondehexe",
+ "name": "BlondeHexe",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/blush-erotica",
+ "name": "Blush Erotica",
+ "company": "Blush Erotica",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/385/logo_crop_1649724830.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/bravomodelsmedia",
+ "name": "BravoModelsMedia",
+ "company": "Bravo Models",
+ "avatar_url": "https://mcdn.vrporn.com/files/20181015142403/ohNFa81Q_400x400.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/casanova",
+ "name": "CasanovA",
+ "company": "CasanovA",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/184/logo_crop_1606868350.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/covert-japan",
+ "name": "CovertJapan",
+ "company": "CovertJapan",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/221/logo_crop_1607605022.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/cuties-vr",
+ "name": "Cuties VR",
+ "company": "Cuties VR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/406/logo_crop_1658768706.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/dandy",
+ "name": "DANDY",
+ "company": "DANDY",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/355/logo_crop_1634611924.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/deepinsex",
+ "name": "DeepInSex",
+ "company": "DeepInSex",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/266/logo_crop_1610126420.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/deviantsvr",
+ "name": "DeviantsVR",
+ "company": "DeviantsVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/351/logo_crop_1638539790.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/ellielouisevr",
+ "name": "EllieLouiseVR",
+ "company": "EllieLouiseVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/265/logo_crop_1607603680.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/emilybloom",
+ "name": "EmilyBloom",
+ "company": "Emily Bloom",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/42/logo_crop_1608166932.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/erotic-sinners",
+ "name": "Erotic Sinners",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/fatp",
+ "name": "FATP",
+ "company": "FATP",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/382/logo_crop_1648196512.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/footsiebay",
+ "name": "Footsiebay",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/fuckpassvr",
+ "name": "FuckPassVR",
+ "company": "FuckPassVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/352/logo_crop_1635153994.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/heathering",
+ "name": "Heathering",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/istripper",
+ "name": "iStripper",
+ "company": "TotemCore Ltd",
+ "avatar_url": "https://www.istripper.com/favicons/istripper/apple-icon-120x120.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/jackandjillvr",
+ "name": "JackandJillVR",
+ "company": "JackandJillVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/367/logo_crop_1645997567.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/jimmydraws",
+ "name": "JimmyDraws",
+ "company": "Jimmy Draws",
+ "avatar_url": "https://mcdn.vrporn.com/files/20190821145930/iLPJW6J7_400x400.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/kinkygirlsberlin",
+ "name": "KinkyGirlsBerlin",
+ "company": "KinkyGirlsBerlin",
+ "avatar_url": "https://mcdn.vrporn.com/files/20211010073751/KinkyGirlsBerlin-logo-400x400.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/kmpvr",
+ "name": "KMPVR",
+ "company": "KMPVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/209/logo_crop_1606869200.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/koalavr",
+ "name": "KoalaVR",
+ "company": "KoalaVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/189/logo_crop_1606868385.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/lustreality",
+ "name": "LustReality",
+ "company": "LustReality",
+ "avatar_url": "https://mcdn.vrporn.com/files/20200316102952/lustreality_logo2.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/lustyvr",
+ "name": "LustyVR",
+ "company": "LustyVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/371/logo_crop_1644057581.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/manny-s",
+ "name": "Manny_S",
+ "company": "Manny_S",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/428/logo_crop_1663700071.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/mongercash",
+ "name": "AsiansexdiaryVR",
+ "company": "AsiansexdiaryVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/219/logo_crop_1628500033.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/mugur-porn-vr",
+ "name": "Mugur Porn VR",
+ "company": "MugurPornVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/375/logo_crop_1649424076.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/mutiny-vr",
+ "name": "Mutiny VR",
+ "company": "Mutiny VR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/401/logo_crop_1656550572.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/no2studiovr",
+ "name": "No2StudioVR",
+ "company": "No2StudioVR",
+ "avatar_url": "https://mcdn.vrporn.com/files/20201021145654/No2StudioVR_400x400-1.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/noir",
+ "name": "Noir",
+ "company": "Noir",
+ "avatar_url": "https://mcdn.vrporn.com/files/20220624124749/Noir-Logo-400x400.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/only3xvr",
+ "name": "Only3xVR",
+ "company": "Only3xVR",
+ "avatar_url": "https://mcdn.vrporn.com/files/20190821140339/only3xvr-profile-pic.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/onlytease",
+ "name": "OnlyTease",
+ "company": "OT Publishing Ltd",
+ "avatar_url": "https://www.onlytease.com/assets/img/favicons/ot/apple-touch-icon.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/peeping-thom",
+ "name": "Peeping Thom",
+ "company": "Peeping Thom",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/303/logo_crop_1619656190.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/pervrt",
+ "name": "perVRt",
+ "company": "Terrible",
+ "avatar_url": "https://mcdn.vrporn.com/files/20181218151630/pervrt-logo.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/petersmax",
+ "name": "PetersMAX",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/pip-vr",
+ "name": "PIP VR",
+ "company": "PIP VR",
+ "avatar_url": "https://www.sexlikereal.com/s/images/content/sexlikereal.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/plushiesvr",
+ "name": "PlushiesVR",
+ "company": "PlushiesVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/122/logo_crop_1615877579.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/povcentralvr",
+ "name": "POVcentralVR",
+ "company": "POV Central",
+ "avatar_url": "https://mcdn.vrporn.com/files/20191125091909/POVCentralLogo.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/ps-porn",
+ "name": "PS-Porn",
+ "company": "Paula Shy",
+ "avatar_url": "https://mcdn.vrporn.com/files/20201221090642/PS-Porn-400x400.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/realhotvr",
+ "name": "RealHotVR",
+ "company": "RealHotVR",
+ "avatar_url": "https://images.povr.com/assets/logos/channels/0/3/3835/200.svg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/sodcreate",
+ "name": "SodCreate",
+ "company": "SodCreate",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/216/logo_crop_1606869217.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/squeeze-vr",
+ "name": "SqueezeVR",
+ "company": "SqueezeVR",
+ "avatar_url": "https://mcdn.vrporn.com/files/20210322150700/squeezevr_logo.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/stockingsvr",
+ "name": "StockingsVR",
+ "company": "StockingsVR",
+ "avatar_url": "https://mcdn.vrporn.com/files/20171107092330/stockingsvr_logo_vr_porn_studio_vrporn.com_virtual_reality1-1.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/strictlyglamourvr",
+ "name": "StrictlyGlamourVR",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/stripzvr",
+ "name": "StripzVR",
+ "company": "N1ck Inc.",
+ "avatar_url": "https://www.stripzvr.com/wp-content/uploads/2018/09/cropped-favicon-192x192.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/suckmevr",
+ "name": "SuckMeVR",
+ "company": "SuckMeVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/403/logo_crop_1657112082.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/swallowbay",
+ "name": "SwallowBay",
+ "company": "SwallowBay",
+ "avatar_url": "https://mcdn.vrporn.com/files/20210330092926/swallowbay-400x400.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/sweetlonglips",
+ "name": "Sweetlonglips",
+ "company": "Sweetlonglips",
+ "avatar_url": "https://mcdn.vrporn.com/files/20200117105304/SLLVRlogo.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/taboo-vr-porn",
+ "name": "Taboo VR Porn",
+ "company": "Taboo VR Porn",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/354/logo_crop_1643894389.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/tadpolexxxstudio",
+ "name": "TadPoleXXXStudio",
+ "company": "TadPoleXXXStudio",
+ "avatar_url": "https://mcdn.vrporn.com/files/20190928101126/tadpolexxx-logo-vr-porn-studio-vrporn.com-virtual-reality.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/thatrandomeditor",
+ "name": "ThatRandomEditor",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/tmavr",
+ "name": "TMAVR",
+ "company": "TMAVR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/207/logo_crop_1606869169.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/v1vr",
+ "name": "V1VR",
+ "company": "V1VR",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/195/logo_crop_1606868432.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/virtualxporn",
+ "name": "VirtualXPorn",
+ "company": "VirtualXPorn",
+ "avatar_url": "https://www.virtualxporn.com/tour/custom_assets/favicons/android-chrome-192x192.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vr-pornnow",
+ "name": "VR Pornnow",
+ "company": "VR Pornnow",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/378/logo_crop_1647344034.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vredging",
+ "name": "VRedging",
+ "company": "VRedging",
+ "avatar_url": "https://mcdn.vrporn.com/files/20200630081500/VRedging_LOGO_v1-400x400.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vrixxens",
+ "name": "VRixxens",
+ "company": "VRixxens",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/332/logo_crop_1663682599.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vrlab9division",
+ "name": "VRlab9division",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vrmodels",
+ "name": "VRModels",
+ "company": "",
+ "avatar_url": ""
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vroomed",
+ "name": "VRoomed",
+ "company": "VRoomed",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/380/logo_crop_1647990015.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vrpfilms",
+ "name": "VRPFilms",
+ "company": "VRPFilms",
+ "avatar_url": "https://vrpfilms.com/storage/settings/March2021/Z0krYIQBMwSJ4R1eCnv1.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vrpornjack",
+ "name": "VRPornJack",
+ "company": "VRPornJack",
+ "avatar_url": "https://mcdn.vrporn.com/files/20210330121852/VRPORNJACK_Logo-400x400.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vrsexperts",
+ "name": "VRSexperts",
+ "company": "VRSexperts",
+ "avatar_url": "https://mcdn.vrporn.com/files/20190812141431/vrsexpertslogo2.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vrsolos",
+ "name": "VRSolos",
+ "company": "VRSolos",
+ "avatar_url": "https://mcdn.vrporn.com/files/20191226092954/VRSolos_Logo.jpg"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vrstars",
+ "name": "VRStars",
+ "company": "VRStars",
+ "avatar_url": "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/271/logo_crop_1648490662.png"
+ },
+ {
+ "url": "https://www.sexlikereal.com/studios/vrvids",
+ "name": "VRVids",
+ "company": "VRVids",
+ "avatar_url": "https://www.sexlikereal.com/s/images/content/sexlikereal.png"
+ }
+ ],
+ "vrporn": [
+ {
+ "url": "https://vrporn.com/studio/randysroadstop",
+ "name": "Randy's Road Stop",
+ "company": "NaughtyAmerica",
+ "avatar_url": "https://mcdn.vrporn.com/files/20170718073527/randysroadstop-vr-porn-studio-vrporn.com-virtual-reality.png"
+ },
+ {
+ "url": "https://vrporn.com/studio/realteensvr",
+ "name": "Real Teens VR",
+ "company": "NaughtyAmerica",
+ "avatar_url": "https://mcdn.vrporn.com/files/20170718063811/realteensvr-vr-porn-studio-vrporn.com-virtual-reality.png"
+ },
+ {
+ "url": "https://vrporn.com/studio/studios/vrclubz",
+ "name": "VRClubz",
+ "company": "VixenVR",
+ "avatar_url": "https://mcdn.vrporn.com/files/20200421094123/vrclubz_logo_NEW-400x400_webwhite.png"
+ }
+ ],
+ "vrphub": [
+ {
+ "id": "vrphub-vrhush",
+ "url": "https://vrphub.com/category/vr-hush",
+ "name": "VRHush",
+ "company": "VRHush",
+ "avatar_url": "https://cdn-nexpectation.secure.yourpornpartner.com/sites/vrh/favicon/apple-touch-icon-180x180.png"
+ },
+ {
+ "id": "vrphub-stripzvr",
+ "url": "https://vrphub.com/category/stripzvr/",
+ "name": "StripzVR - VRP Hub",
+ "company": "StripzVR",
+ "avatar_url": "https://www.stripzvr.com/wp-content/uploads/2018/09/cropped-favicon-192x192.jpg"
+ }
+ ]
+ }
+ }
diff --git a/pkg/migrations/migrations.go b/pkg/migrations/migrations.go
index 4a7decdc7..6be8c8bf3 100644
--- a/pkg/migrations/migrations.go
+++ b/pkg/migrations/migrations.go
@@ -535,7 +535,16 @@ func Migrate() {
return tx.AutoMigrate(File{}).Error
},
},
-
+ {
+ ID: "0053-add-legacy-scene-id-to-save-old-scene_ids",
+ Migrate: func(tx *gorm.DB) error {
+ type Scene struct {
+ LegacySceneID string `json:"legacy_scene_id" xbvrbackup:"legacy_scene_id"`
+ ScraperId string `json:"scraper_id" xbvrbackup:"scraper_id"`
+ }
+ return tx.AutoMigrate(Scene{}).Error
+ },
+ },
// ===============================================================================================
// Put DB Schema migrations above this line and migrations that rely on the updated schema below
// ===============================================================================================
@@ -1216,6 +1225,136 @@ func Migrate() {
return nil
},
},
+ {
+ ID: "0054-Update-New-Scraper-Id-in-Scene-Record",
+ Migrate: func(tx *gorm.DB) error {
+ var sites []models.Site
+ tx.Model(&sites).Find(&sites)
+
+ // create a scene type without deleted_at and updated_at columns
+ // this means deleted records are updated as well and does not change the updated_at column
+ type match struct {
+ siteId string
+ sceneIdPattern string
+ }
+ var manualSites []match
+ manualSites = append(manualSites, match{"tonightsgirlfriend", "tonight-s-girlfriend-vr%"})
+ manualSites = append(manualSites, match{"littlecaprice", "little-caprice-dreams%"})
+ manualSites = append(manualSites, match{"slr-originals-bts", "slr-originals-bts%"})
+ manualSites = append(manualSites, match{"taboo-vr-porn", "taboo-vr-porn%"})
+
+ var returnErr error
+ for _, site := range manualSites {
+ common.Log.Infof("Setting scraper_id for %s", site.siteId)
+ err := tx.Model(models.Scene{}).Where("scene_id like ? and scraper_id is null", site.sceneIdPattern).Update("scraper_id", strings.ToLower(site.siteId)).Error
+ if err != nil {
+ returnErr = err
+ }
+ }
+ for _, site := range sites {
+ common.Log.Infof("Setting scraper_id for %s", site.Name)
+ err := tx.Model(&models.Scene{}).Where("replace(scene_id,'-','') like ? and scraper_id is null", strings.Replace(site.ID, "-", "", -1)+"%").Update("scraper_id", strings.ToLower(site.ID)).Error
+ if err != nil {
+ returnErr = err
+ }
+ }
+
+ return returnErr
+ },
+ },
+ {
+ ID: "0055-update-aggregator-scene-ids",
+ Migrate: func(tx *gorm.DB) error {
+ type SiteChange struct {
+ SiteId string
+ NewPrefix string
+ }
+ //backup bundle
+ common.Log.Infof("Creating pre-migration backup, please waiit, backups can take some time on a system with a large number of scenes ")
+ tasks.BackupBundle(true, false, true, true, true, true, true, true, true, true, true, "0", "xbvr-premigration-bundle.json", "2")
+ common.Log.Infof("Go to download/xbvr-premigration-bundle.json, or http://xxx.xxx.xxx.xxx:9999/download/xbvr-premigration-bundle.json if you need access to the backup")
+ var sites []models.Site
+ officalSiteChanges := []SiteChange{
+ {"povr-originals", "povr"}, {"wankzvr", "povr"}, {"milfvr", "povr"}, {"herpovr", "povr"}, {"brasilvr", "povr"}, {"tranzvr", "povr"},
+ {"slr-originals", "slr"}, {"slr-labs", "slr"}, {"slr-jav-originals", "slr"}, {"amateurcouplesvr", "slr"}, {"amateurvr3d", "slr"}, {"amorevr", "slr"}, {"astrodomina", "slr"}, {"blondehexe", "slr"}, {"blush-erotica", "slr"}, {"bravomodelsmedia", "slr"}, {"casanova", "slr"}, {"covert-japan", "slr"}, {"cuties-vr", "slr"}, {"dandy", "slr"}, {"deepinsex", "slr"}, {"deviantsvr", "slr"}, {"ellielouisevr", "slr"}, {"emilybloom", "slr"}, {"erotic-sinners", "slr"}, {"fatp", "slr"}, {"footsiebay", "slr"}, {"fuckpassvr", "slr"}, {"heathering", "slr"}, {"istripper", "slr"}, {"jackandjillvr", "slr"}, {"jimmydraws", "slr"}, {"kinkygirlsberlin", "slr"}, {"kmpvr", "slr"}, {"koalavr", "slr"}, {"lustreality", "slr"}, {"lustyvr", "slr"}, {"manny-s", "slr"}, {"mongercash", "slr"}, {"mugur-porn-vr", "slr"}, {"mutiny-vr", "slr"}, {"no2studiovr", "slr"}, {"noir", "slr"}, {"only3xvr", "slr"}, {"onlytease", "slr"}, {"peeping-thom", "slr"}, {"pervrt", "slr"}, {"petersmax", "slr"}, {"pip-vr", "slr"}, {"plushiesvr", "slr"}, {"povcentralvr", "slr"}, {"ps-porn", "slr"}, {"realhotvr", "slr"}, {"sodcreate", "slr"}, {"squeeze-vr", "slr"}, {"stockingsvr", "slr"}, {"strictlyglamourvr", "slr"}, {"stripzvr", "slr"}, {"suckmevr", "slr"}, {"swallowbay", "slr"}, {"sweetlonglips", "slr"}, {"taboo-vr-porn", "slr"}, {"tadpolexxxstudio", "slr"}, {"thatrandomeditor", "slr"}, {"tmavr", "slr"}, {"v1vr", "slr"}, {"virtualxporn", "slr"}, {"vr-pornnow", "slr"}, {"vredging", "slr"}, {"vrixxens", "slr"}, {"vrlab9division", "slr"}, {"vrmodels", "slr"}, {"vroomed", "slr"}, {"vrpfilms", "slr"}, {"vrpornjack", "slr"}, {"vrsexperts", "slr"}, {"vrsolos", "slr"}, {"vrstars", "slr"}, {"vrvids", "slr"},
+ {"vrphub-vrhush", "vrphub"}, {"vrphub-stripzvr", "vrphub"},
+ {"randysroadstop", "vrporn"}, {"realteensvr", "vrporn"}, {"vrclubz", "vrporn"},
+ }
+
+ isOfficalSite := func(siteList []SiteChange, siteID string) bool {
+ for _, s := range siteList {
+ if s.SiteId == siteID {
+ return true
+ }
+ }
+ return false
+ }
+
+ // add aggregator sites not already in officalSiteChanges
+ unofficalSiteChanges := []SiteChange{{"slr-originals-bts", "slr"}}
+ db.Where("name like '%)'").Find(&sites)
+ for _, site := range sites {
+ if !isOfficalSite(officalSiteChanges, site.ID) {
+ // get (SLR), (VRPORN), etc
+ re := regexp.MustCompile(`\(([^)]+)\)`)
+ result := re.FindStringSubmatch(site.Name)
+ newSuffix := ""
+ if len(result) > 1 {
+ switch result[0] {
+ case "(POVR)":
+ newSuffix = "povr"
+ case "(SLR)":
+ newSuffix = "slr"
+ case "(VRP Hub)":
+ newSuffix = "vrphub"
+ case "(VRPorn)":
+ newSuffix = "vrporn"
+ default:
+ common.Log.Warnf("Unknown aggregator site (%s)", site.Name)
+ }
+ unofficalSiteChanges = append(unofficalSiteChanges, SiteChange{site.ID, newSuffix})
+ } else {
+ common.Log.Warnf("Unknown aggregator site (%s)", site.Name)
+ }
+ }
+ }
+
+ for _, siteChange := range append(unofficalSiteChanges, officalSiteChanges...) {
+ common.Log.Infof("Migrating scene_ids for %s to %s", siteChange.SiteId, siteChange.NewPrefix)
+ sql := `update actions set scene_id = replace(scene_id, LOWER("` + siteChange.SiteId + `-"), "` + siteChange.NewPrefix + `-") where scene_id like "` + siteChange.SiteId + `-%"`
+ tx.Exec(sql)
+ sql = `update actions set scene_id = replace(replace(scene_id, '-',''), LOWER("` + siteChange.SiteId + `"), "` + siteChange.NewPrefix + `-") where scene_id not like "` + siteChange.NewPrefix + `-%" and scraper_id = "` + strings.ToLower(siteChange.SiteId) + `"`
+ tx.Exec(sql)
+ // set new scene_id
+ sql = `update scenes set legacy_scene_id=scene_id, scene_id = replace(scene_id, LOWER("` + siteChange.SiteId + `-"), "` + siteChange.NewPrefix + `-") where scene_id like "` + siteChange.SiteId + `-%"`
+ tx.Exec(sql)
+ sql = `update scenes set legacy_scene_id=scene_id, scene_id = replace(replace(scene_id, '-',''), LOWER("` + siteChange.SiteId + `"), "` + siteChange.NewPrefix + `-") where scene_id not like "` + siteChange.NewPrefix + `-%" and scraper_id = "` + strings.ToLower(siteChange.SiteId) + `"`
+ tx.Exec(sql)
+ }
+
+ common.Log.Infof("Removing old sites")
+ for _, site := range unofficalSiteChanges {
+ // update scene scraper_id with new suffix, in case they are added back as a Custom site in scraper.json. Needs_update to refresh new site name
+ sql := fmt.Sprintf(`update scenes set scraper_id="%s", needs_update = 1 where scraper_id = "%s"`, strings.ToLower(site.SiteId+"-"+site.NewPrefix), strings.ToLower(site.SiteId))
+ tx.Exec(sql)
+
+ // delete unoffical sites from site table
+ tx.Delete(&models.Site{ID: site.SiteId})
+ }
+
+ common.Log.Infof("Migrating Video Previews")
+ var scenes []models.Scene
+ tx.Where("legacy_scene_id is not null").Where(&models.Scene{HasVideoPreview: true}).Find(&scenes)
+ for _, scene := range scenes {
+ os.Rename(filepath.Join(common.VideoPreviewDir, fmt.Sprintf("%v.mp4", scene.LegacySceneID)), filepath.Join(common.VideoPreviewDir, fmt.Sprintf("%v.mp4", scene.SceneID)))
+ }
+
+ common.Log.Infof("Migration needs to Reindex scenes.. please wait")
+ tasks.SearchIndex()
+ common.Log.Infof("Reindex of scenes complete")
+ return nil
+ },
+ },
})
if err := m.Migrate(); err != nil {
diff --git a/pkg/models/model_scene.go b/pkg/models/model_scene.go
index 3cb738d7e..cf23d384b 100644
--- a/pkg/models/model_scene.go
+++ b/pkg/models/model_scene.go
@@ -64,6 +64,7 @@ type Scene struct {
SceneID string `json:"scene_id" xbvrbackup:"scene_id"`
Title string `json:"title" sql:"type:varchar(1024);" xbvrbackup:"title"`
SceneType string `json:"scene_type" xbvrbackup:"scene_type"`
+ ScraperId string `json:"scraper_id" xbvrbackup:"scraper_id"`
Studio string `json:"studio" xbvrbackup:"studio"`
Site string `json:"site" xbvrbackup:"site"`
Tags []Tag `gorm:"many2many:scene_tags;" json:"tags" xbvrbackup:"tags"`
@@ -103,6 +104,7 @@ type Scene struct {
TrailerSource string `gorm:"size:1000" json:"trailer_source" xbvrbackup:"trailer_source"`
Trailerlist bool `json:"trailerlist" gorm:"default:false" xbvrbackup:"trailerlist"`
IsHidden bool `json:"is_hidden" gorm:"default:false" xbvrbackup:"is_hidden"`
+ LegacySceneID string `json:"legacy_scene_id" xbvrbackup:"legacy_scene_id"`
Description string `gorm:"-" json:"description" xbvrbackup:"-"`
Score float64 `gorm:"-" json:"_score" xbvrbackup:"-"`
@@ -389,6 +391,7 @@ func SceneCreateUpdateFromExternal(db *gorm.DB, ext ScrapedScene) error {
o.NeedsUpdate = false
o.EditsApplied = false
o.SceneID = ext.SceneID
+ o.ScraperId = ext.ScraperID
if o.Title != ext.Title {
o.Title = ext.Title
@@ -829,7 +832,30 @@ func QueryScenes(r RequestSceneList, enablePreload bool) ResponseSceneList {
} else {
where = "favourite = 0"
}
-
+ case "POVR Scraper":
+ if truefalse {
+ where = `scenes.scene_id like "povr-%"`
+ } else {
+ where = `scenes.scene_id not like "povr-%"`
+ }
+ case "SLR Scraper":
+ if truefalse {
+ where = `scenes.scene_id like "slr-%"`
+ } else {
+ where = `scenes.scene_id not like "slr-%"`
+ }
+ case "VRPHub Scraper":
+ if truefalse {
+ where = `scenes.scene_id like "vrphub-%"`
+ } else {
+ where = `scenes.scene_id not like "vrphub-%"`
+ }
+ case "VRPorn Scraper":
+ if truefalse {
+ where = `scenes.scene_id like "vrporn-%"`
+ } else {
+ where = `scenes.scene_id not like "vrporn-%"`
+ }
}
switch firstchar := string(attribute.OrElse(" ")[0]); firstchar {
diff --git a/pkg/scrape/baberoticavr.go b/pkg/scrape/baberoticavr.go
index 450ae2c9a..2e89d52c8 100644
--- a/pkg/scrape/baberoticavr.go
+++ b/pkg/scrape/baberoticavr.go
@@ -25,6 +25,7 @@ func BaberoticaVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "Baberotica"
sc.Site = siteID
diff --git a/pkg/scrape/badoink.go b/pkg/scrape/badoink.go
index 0489a9871..88b41f0c3 100644
--- a/pkg/scrape/badoink.go
+++ b/pkg/scrape/badoink.go
@@ -24,6 +24,7 @@ func BadoinkSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "Badoink"
sc.HomepageURL = strings.Split(e.Request.URL.String(), "?")[0]
diff --git a/pkg/scrape/caribbeancom.go b/pkg/scrape/caribbeancom.go
index 752a5c90a..c86f09a02 100644
--- a/pkg/scrape/caribbeancom.go
+++ b/pkg/scrape/caribbeancom.go
@@ -28,6 +28,7 @@ func CariVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "Caribbeancom"
sc.Site = siteID
diff --git a/pkg/scrape/czechvr.go b/pkg/scrape/czechvr.go
index 5d6b4b0c2..38690b5c4 100644
--- a/pkg/scrape/czechvr.go
+++ b/pkg/scrape/czechvr.go
@@ -23,6 +23,7 @@ func CzechVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "CzechVR"
sc.Site = siteID
diff --git a/pkg/scrape/darkroomvr.go b/pkg/scrape/darkroomvr.go
index 8502a575a..512104fb4 100644
--- a/pkg/scrape/darkroomvr.go
+++ b/pkg/scrape/darkroomvr.go
@@ -24,6 +24,7 @@ func DarkRoomVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out c
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "VirtualTaboo"
sc.Site = siteID
diff --git a/pkg/scrape/ddfnetworkvr.go b/pkg/scrape/ddfnetworkvr.go
index aa7e0411b..9d5d1a758 100644
--- a/pkg/scrape/ddfnetworkvr.go
+++ b/pkg/scrape/ddfnetworkvr.go
@@ -24,6 +24,7 @@ func DDFNetworkVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "DDFNetwork"
sc.Site = siteID
diff --git a/pkg/scrape/groobyvr.go b/pkg/scrape/groobyvr.go
index 7bfb41268..82907a49b 100644
--- a/pkg/scrape/groobyvr.go
+++ b/pkg/scrape/groobyvr.go
@@ -27,6 +27,7 @@ func GroobyVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out cha
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "GroobyVR"
sc.Site = siteID
@@ -126,5 +127,5 @@ func GroobyVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out cha
}
func init() {
- registerScraper("groobyvr", "GroobyVR", "https://pbs.twimg.com/profile_images/981677396695773184/-kKaWumY_200x200.jpg", GroobyVR)
+ registerScraper("groobyvr", "GroobyVR", "https://www.groobyvr.com/tour/custom_assets/favicon/apple-touch-icon.png", GroobyVR)
}
diff --git a/pkg/scrape/hologirlsvr.go b/pkg/scrape/hologirlsvr.go
index 08132f7eb..a3369a0d2 100644
--- a/pkg/scrape/hologirlsvr.go
+++ b/pkg/scrape/hologirlsvr.go
@@ -22,6 +22,7 @@ func HoloGirlsVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "HoloFilm Productions"
sc.Site = siteID
diff --git a/pkg/scrape/lethalhardcorevr.go b/pkg/scrape/lethalhardcorevr.go
index e9e66772c..48bbfc161 100644
--- a/pkg/scrape/lethalhardcorevr.go
+++ b/pkg/scrape/lethalhardcorevr.go
@@ -35,6 +35,7 @@ func LethalHardcoreSite(wg *sync.WaitGroup, updateSite bool, knownScenes []strin
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "Celestial Productions"
sc.HomepageURL = strings.Split(e.Request.URL.String(), "?")[0]
diff --git a/pkg/scrape/littlecaprice.go b/pkg/scrape/littlecaprice.go
index 0d2b1680b..9872d6320 100644
--- a/pkg/scrape/littlecaprice.go
+++ b/pkg/scrape/littlecaprice.go
@@ -30,6 +30,7 @@ func LittleCaprice(wg *sync.WaitGroup, updateSite bool, knownScenes []string, ou
sceneCollector.OnHTML(`article.project`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "Little Caprice Media"
sc.Site = siteID
diff --git a/pkg/scrape/navr.go b/pkg/scrape/navr.go
index e243c673a..caf27b5f7 100644
--- a/pkg/scrape/navr.go
+++ b/pkg/scrape/navr.go
@@ -25,6 +25,7 @@ func NaughtyAmericaVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string,
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "NaughtyAmerica"
sc.Site = siteID
diff --git a/pkg/scrape/povr.go b/pkg/scrape/povr.go
index 66a1cb5b8..b85a0adad 100644
--- a/pkg/scrape/povr.go
+++ b/pkg/scrape/povr.go
@@ -6,13 +6,13 @@ import (
"sync"
"github.com/gocolly/colly"
- "github.com/mozillazg/go-slugify"
"github.com/nleeper/goment"
"github.com/thoas/go-funk"
+ "github.com/xbapps/xbvr/pkg/config"
"github.com/xbapps/xbvr/pkg/models"
)
-func POVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, scraperID string, siteID string, company string) error {
+func POVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, scraperID string, siteID string, company string, siteURL string) error {
defer wg.Done()
logScrapeStart(scraperID, siteID)
@@ -21,6 +21,7 @@ func POVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<-
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = company
sc.Site = siteID
@@ -29,7 +30,7 @@ func POVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<-
// Scene ID - get from URL
tmp := strings.Split(sc.HomepageURL, "-")
sc.SiteID = tmp[len(tmp)-1]
- sc.SceneID = slugify.Slugify(scraperID) + "-" + sc.SiteID
+ sc.SceneID = "povr-" + sc.SiteID
// Title
e.ForEach(`h1.heading-title`, func(id int, e *colly.HTMLElement) {
@@ -101,7 +102,7 @@ func POVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<-
siteCollector.Visit(pageURL)
})
- siteCollector.Visit("https://povr.com/" + scraperID)
+ siteCollector.Visit(siteURL)
if updateSite {
updateSiteLastUpdate(scraperID)
@@ -110,18 +111,28 @@ func POVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<-
return nil
}
-func addPOVRScraper(id string, name string, company string, avatarURL string) {
+func addPOVRScraper(id string, name string, company string, avatarURL string, custom bool, siteURL string) {
suffixedName := name
+ siteNameSuffix := name
+ if custom {
+ suffixedName += " (Custom POVR)"
+ siteNameSuffix += " (POVR)"
+ }
if company != "POVR.COM" {
suffixedName += " (POVR)"
}
registerScraper(id, suffixedName, avatarURL, func(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene) error {
- return POVR(wg, updateSite, knownScenes, out, id, name, company)
+ return POVR(wg, updateSite, knownScenes, out, id, siteNameSuffix, company, siteURL)
})
}
func init() {
- addPOVRScraper("povr-originals", "POVR Originals", "POVR.COM", "https://images.povr.com/img/povr/android-icon-192x192.png")
- addPOVRScraper("herpovr", "herPOVR", "POVR.COM", "https://images.povr.com/img/povr/android-icon-192x192.png")
- addPOVRScraper("brasilvr", "BrasilVR", "BrasilVR", "https://images.povr.com/assets/logos/channels/0/4/4145/200.svg")
+ var scrapers config.ScraperList
+ scrapers.Load()
+ for _, scraper := range scrapers.XbvrScrapers.PovrScrapers {
+ addPOVRScraper(scraper.ID, scraper.Name, scraper.Company, scraper.AvatarUrl, false, scraper.URL)
+ }
+ for _, scraper := range scrapers.CustomScrapers.PovrScrapers {
+ addPOVRScraper(scraper.ID, scraper.Name, scraper.Company, scraper.AvatarUrl, true, scraper.URL)
+ }
}
diff --git a/pkg/scrape/r18.go b/pkg/scrape/r18.go
index 857305ecd..e57d919f4 100644
--- a/pkg/scrape/r18.go
+++ b/pkg/scrape/r18.go
@@ -19,6 +19,7 @@ func ScrapeR18(knownScenes []string, out *[]models.ScrapedScene, queryString str
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = "r18"
sc.SceneType = "VR"
sc.Studio = "JAVR"
sc.HomepageURL = strings.Split(e.Request.URL.String(), "?")[0]
diff --git a/pkg/scrape/realitylovers.go b/pkg/scrape/realitylovers.go
index c6e09f0d6..b3697e4e1 100644
--- a/pkg/scrape/realitylovers.go
+++ b/pkg/scrape/realitylovers.go
@@ -23,6 +23,7 @@ func RealityLoversSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "RealityLovers"
sc.Site = siteID
diff --git a/pkg/scrape/sexbabesvr.go b/pkg/scrape/sexbabesvr.go
index abf60f360..68de5c068 100644
--- a/pkg/scrape/sexbabesvr.go
+++ b/pkg/scrape/sexbabesvr.go
@@ -24,6 +24,7 @@ func SexBabesVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out c
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "SexBabesVR"
sc.Site = siteID
diff --git a/pkg/scrape/sinsvr.go b/pkg/scrape/sinsvr.go
index f2ab4c155..81f9490cb 100644
--- a/pkg/scrape/sinsvr.go
+++ b/pkg/scrape/sinsvr.go
@@ -31,6 +31,7 @@ func SinsVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "SinsVR"
sc.Site = siteID
diff --git a/pkg/scrape/slrstudios.go b/pkg/scrape/slrstudios.go
index d98a92cad..b30388aef 100644
--- a/pkg/scrape/slrstudios.go
+++ b/pkg/scrape/slrstudios.go
@@ -8,13 +8,13 @@ import (
"sync"
"github.com/gocolly/colly"
- "github.com/mozillazg/go-slugify"
"github.com/thoas/go-funk"
"github.com/tidwall/gjson"
+ "github.com/xbapps/xbvr/pkg/config"
"github.com/xbapps/xbvr/pkg/models"
)
-func SexLikeReal(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, scraperID string, siteID string, company string) error {
+func SexLikeReal(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, scraperID string, siteID string, company string, siteURL string) error {
defer wg.Done()
logScrapeStart(scraperID, siteID)
@@ -29,6 +29,7 @@ func SexLikeReal(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = company
sc.Site = siteID
@@ -37,7 +38,7 @@ func SexLikeReal(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
// Scene ID - get from URL
tmp := strings.Split(sc.HomepageURL, "-")
sc.SiteID = tmp[len(tmp)-1]
- sc.SceneID = slugify.Slugify(scraperID) + "-" + sc.SiteID
+ sc.SceneID = "slr-" + sc.SiteID
// Cover
coverURL := e.ChildAttr(`.splash-screen > img`, "src")
@@ -219,7 +220,7 @@ func SexLikeReal(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
}
})
- siteCollector.Visit("https://www.sexlikereal.com/studios/" + scraperID + "?sort=most_recent")
+ siteCollector.Visit(siteURL + "?sort=most_recent")
if updateSite {
updateSiteLastUpdate(scraperID)
@@ -228,10 +229,16 @@ func SexLikeReal(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
return nil
}
-func addSLRScraper(id string, name string, company string, avatarURL string) {
+func addSLRScraper(id string, name string, company string, avatarURL string, custom bool, siteURL string) {
suffixedName := name
- if company != "SexLikeReal" {
- suffixedName += " (SLR)"
+ siteNameSuffix := name
+ if custom {
+ suffixedName += " (Custom SLR)"
+ siteNameSuffix += " (SLR)"
+ } else {
+ if company != "SexLikeReal" {
+ suffixedName += " (SLR)"
+ }
}
if avatarURL == "" {
@@ -239,114 +246,18 @@ func addSLRScraper(id string, name string, company string, avatarURL string) {
}
registerScraper(id, suffixedName, avatarURL, func(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene) error {
- return SexLikeReal(wg, updateSite, knownScenes, out, id, name, company)
+ return SexLikeReal(wg, updateSite, knownScenes, out, id, siteNameSuffix, company, siteURL)
})
}
func init() {
- addSLRScraper("slr-originals", "SLR Originals", "SexLikeReal", "https://www.sexlikereal.com/s/refactor/images/favicons/android-icon-192x192.png")
- addSLRScraper("slr-originals-bts", "SLR Originals BTS", "SexLikeReal", "https://www.sexlikereal.com/s/refactor/images/favicons/android-icon-192x192.png")
- addSLRScraper("slr-labs", "SLR Labs", "SexLikeReal", "https://www.sexlikereal.com/s/refactor/images/favicons/android-icon-192x192.png")
- addSLRScraper("slr-jav-originals", "SLR JAV Originals", "SexLikeReal", "https://www.sexlikereal.com/s/refactor/images/favicons/android-icon-192x192.png")
-
- addSLRScraper("ad4x", "AD4X", "AD4X", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/230/logo_crop_1606755231.png")
- addSLRScraper("altporn4u-vr", "AltPorn4uVR", "AltPorn4uVR", "https://www.altporn4u.com/wp-content/uploads/2020/08/altporn4u-150x150.jpg")
- addSLRScraper("amateurcouplesvr", "AmateurCouplesVR", "AmateurCouplesVR", "https://www.sexlikereal.com/s/images/content/sexlikereal.png")
- addSLRScraper("amateurvr3d", "AmateurVR3D", "AmateurVR3D", "")
- addSLRScraper("amorevr", "AmoreVR", "AmoreVR", "")
- addSLRScraper("anal-delight", "Anal Delight", "AnalDelight", "https://mcdn.vrporn.com/files/20200907184611/AnalDelight_Logo.jpg")
- addSLRScraper("astrodomina", "AstroDomina", "AstroDomina", "")
- addSLRScraper("babykxtten", "Babykxtten", "Babykxtten", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/321/logo_crop_1624979737.png")
- addSLRScraper("blondehexe", "BlondeHexe", "BlondeHexe", "")
- addSLRScraper("blush-erotica", "Blush Erotica", "Blush Erotica", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/385/logo_crop_1649724830.png")
- addSLRScraper("bravomodelsmedia", "BravoModelsMedia", "Bravo Models", "https://mcdn.vrporn.com/files/20181015142403/ohNFa81Q_400x400.png")
- addSLRScraper("burningangelvr", "BurningAngelVR", "BurningAngelVR", "https://mcdn.vrporn.com/files/20170830191746/burningangel-icon-vr-porn-studio-vrporn.com-virtual-reality.png")
- addSLRScraper("casanova", "CasanovA", "CasanovA", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/184/logo_crop_1606868350.png")
- addSLRScraper("covert-japan", "CovertJapan", "CovertJapan", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/221/logo_crop_1607605022.png")
- addSLRScraper("cumtoon", "Cumtoon", "Cumtoon", "https://www.sexlikereal.com/s/images/content/sexlikereal.png")
- addSLRScraper("cuties-vr", "Cuties VR", "Cuties VR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/406/logo_crop_1658768706.png")
- addSLRScraper("dandy", "DANDY", "DANDY", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/355/logo_crop_1634611924.png")
- addSLRScraper("ddfnetworkvr", "DDFNetworkVR", "DDFNetworkVR", "http://pbs.twimg.com/profile_images/1083417183722434560/Ur5xIhqG_200x200.jpg")
- addSLRScraper("deepinsex", "DeepInSex", "DeepInSex", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/266/logo_crop_1610126420.png")
- addSLRScraper("deviantsvr", "DeviantsVR", "DeviantsVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/351/logo_crop_1638539790.png")
- addSLRScraper("ellielouisevr", "EllieLouiseVR", "EllieLouiseVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/265/logo_crop_1607603680.png")
- addSLRScraper("emilybloom", "EmilyBloom", "Emily Bloom", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/42/logo_crop_1608166932.png")
- addSLRScraper("erotic-sinners", "Erotic Sinners", "Erotic Sinners", "")
- addSLRScraper("fatp", "FATP", "FATP", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/382/logo_crop_1648196512.png")
- addSLRScraper("footsiebay", "Footsiebay", "Footsiebay", "")
- addSLRScraper("fuckpassvr", "FuckPassVR", "FuckPassVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/352/logo_crop_1635153994.png")
- addSLRScraper("grannies-vr", "GranniesVR", "GranniesVR", "https://mcdn.vrporn.com/files/20180222024100/itsmorti-logo-vr-porn-studio-vrporn.com-virtual-reality.jpg")
- addSLRScraper("heathering", "Heathering", "Heathering", "")
- addSLRScraper("hentaivr", "HentaiVR", "HentaiVR", "https://pbs.twimg.com/profile_images/1394712735854874632/ULktf61I_400x400.jpg")
- addSLRScraper("herfirstvr", "HerFirstVR", "HerFirstVR", "https://www.sexlikereal.com/s/refactor/images/favicons/android-icon-192x192.png")
- addSLRScraper("holivr", "HoliVR", "HoliVR", "")
- addSLRScraper("hookfer", "Hookfer", "Hookfer", "https://mcdn.vrporn.com/files/20201116170637/400x400-Hookfer-logo.jpg")
- addSLRScraper("istripper", "iStripper", "TotemCore Ltd", "https://www.istripper.com/favicons/istripper/apple-icon-120x120.png")
- addSLRScraper("jackandjillvr", "JackandJillVR", "JackandJillVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/367/logo_crop_1645997567.png")
- addSLRScraper("jimmydraws", "JimmyDraws", "Jimmy Draws", "https://mcdn.vrporn.com/files/20190821145930/iLPJW6J7_400x400.png")
- addSLRScraper("justvr", "JustVR", "JustVR", "https://mcdn.vrporn.com/files/20181023121629/logo.jpg")
- addSLRScraper("jvrporn", "JVRPorn", "JVRPorn", "https://mcdn.vrporn.com/files/20170710084815/jvrporn-vr-porn-studio-vrporn.com-virtual-reality.png")
- addSLRScraper("kinkygirlsberlin", "KinkyGirlsBerlin", "KinkyGirlsBerlin", "https://mcdn.vrporn.com/files/20211010073751/KinkyGirlsBerlin-logo-400x400.jpg")
- addSLRScraper("kmpvr", "KMPVR", "KMPVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/209/logo_crop_1606869200.png")
- addSLRScraper("koalavr", "KoalaVR", "KoalaVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/189/logo_crop_1606868385.png")
- addSLRScraper("leninacrowne", "LeninaCrowne", "Terrible", "https://mcdn.vrporn.com/files/20190711135807/terrible_logo-e1562878668857_400x400_acf_cropped.jpg")
- addSLRScraper("lezvr", "LezVR", "LezVR", "")
- addSLRScraper("lustreality", "LustReality", "LustReality", "https://mcdn.vrporn.com/files/20200316102952/lustreality_logo2.png")
- addSLRScraper("lustyvr", "LustyVR", "LustyVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/371/logo_crop_1644057581.png")
- addSLRScraper("manny-s", "Manny_S", "Manny_S", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/428/logo_crop_1663700071.png")
- addSLRScraper("marrionvr", "MarrionVR", "MarrionVR", "https://www.sexlikereal.com/s/images/content/sexlikereal.png")
- addSLRScraper("maturesvr", "MaturesVR", "MaturesVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/314/logo_crop_1620737406.png")
- addSLRScraper("mmm100", "MMM100", "MMM100", "https://mmm100.com/MMM100.png")
- addSLRScraper("mongercash", "AsiansexdiaryVR", "AsiansexdiaryVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/219/logo_crop_1628500033.png")
- addSLRScraper("mugur-porn-vr", "Mugur Porn VR", "MugurPornVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/375/logo_crop_1649424076.png")
- addSLRScraper("mutiny-vr", "Mutiny VR", "Mutiny VR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/401/logo_crop_1656550572.png")
- addSLRScraper("net69vr", "Net69VR", "Net69VR", "")
- addSLRScraper("no2studiovr", "No2StudioVR", "No2StudioVR", "https://mcdn.vrporn.com/files/20201021145654/No2StudioVR_400x400-1.jpg")
- addSLRScraper("noir", "Noir", "Noir", "https://mcdn.vrporn.com/files/20220624124749/Noir-Logo-400x400.jpg")
- addSLRScraper("only3xvr", "Only3xVR", "Only3xVR", "https://mcdn.vrporn.com/files/20190821140339/only3xvr-profile-pic.jpg")
- addSLRScraper("onlytease", "OnlyTease", "OT Publishing Ltd", "https://www.onlytease.com/assets/img/favicons/ot/apple-touch-icon.png")
- addSLRScraper("peeping-thom", "Peeping Thom", "Peeping Thom", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/303/logo_crop_1619656190.png")
- addSLRScraper("pervrt", "perVRt", "Terrible", "https://mcdn.vrporn.com/files/20181218151630/pervrt-logo.jpg")
- addSLRScraper("petersmax", "PetersMAX", "PetersMAX", "")
- addSLRScraper("pip-vr", "PIP VR", "PIP VR", "https://www.sexlikereal.com/s/images/content/sexlikereal.png")
- addSLRScraper("plushiesvr", "PlushiesVR", "PlushiesVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/122/logo_crop_1615877579.png")
- addSLRScraper("pornbcn", "Pornbcn", "Pornbcn", "https://mcdn.vrporn.com/files/20190923110340/CHANNEL-LOGO-2.jpg")
- addSLRScraper("povcentralvr", "POVcentralVR", "POV Central", "https://mcdn.vrporn.com/files/20191125091909/POVCentralLogo.jpg")
- addSLRScraper("ps-porn", "PS-Porn", "Paula Shy", "https://mcdn.vrporn.com/files/20201221090642/PS-Porn-400x400.jpg")
- addSLRScraper("pvrstudio", "PVRStudio", "PVRStudio", "https://pvr.fun/uploads/2019/10/08/084230gbctdepe7kovu4hs.jpg")
- addSLRScraper("realhotvr", "RealHotVR", "RealHotVR", "https://images.povr.com/assets/logos/channels/0/3/3835/200.svg")
- addSLRScraper("screwboxvr", "ScrewBoxVR", "ScrewBox", "https://pbs.twimg.com/profile_images/1137432770936918016/ycL3ag5c_200x200.png")
- addSLRScraper("sodcreate", "SodCreate", "SodCreate", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/216/logo_crop_1606869217.png")
- addSLRScraper("squeeze-vr", "SqueezeVR", "SqueezeVR", "https://mcdn.vrporn.com/files/20210322150700/squeezevr_logo.png")
- addSLRScraper("stockingsvr", "StockingsVR", "StockingsVR", "https://mcdn.vrporn.com/files/20171107092330/stockingsvr_logo_vr_porn_studio_vrporn.com_virtual_reality1-1.png")
- addSLRScraper("strictlyglamourvr", "StrictlyGlamourVR", "StrictlyGlamourVR", "")
- addSLRScraper("stripzvr", "StripzVR", "N1ck Inc.", "https://www.stripzvr.com/wp-content/uploads/2018/09/cropped-favicon-192x192.jpg")
- addSLRScraper("suckmevr", "SuckMeVR", "SuckMeVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/403/logo_crop_1657112082.png")
- addSLRScraper("swallowbay", "SwallowBay", "SwallowBay", "https://mcdn.vrporn.com/files/20210330092926/swallowbay-400x400.jpg")
- addSLRScraper("sweetlonglips", "Sweetlonglips", "Sweetlonglips", "https://mcdn.vrporn.com/files/20200117105304/SLLVRlogo.png")
- addSLRScraper("taboo-vr-porn", "Taboo VR Porn", "Taboo VR Porn", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/354/logo_crop_1643894389.png")
- addSLRScraper("tadpolexxxstudio", "TadPoleXXXStudio", "TadPoleXXXStudio", "https://mcdn.vrporn.com/files/20190928101126/tadpolexxx-logo-vr-porn-studio-vrporn.com-virtual-reality.png")
- addSLRScraper("thatrandomeditor", "ThatRandomEditor", "ThatRandomEditor", "")
- addSLRScraper("tmavr", "TMAVR", "TMAVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/207/logo_crop_1606869169.png")
- addSLRScraper("v1vr", "V1VR", "V1VR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/195/logo_crop_1606868432.png")
- addSLRScraper("virtualpee", "VirtualPee", "VirtualPee", "https://mcdn.vrporn.com/files/20180317104121/virtualpeeop-square-banner.jpg")
- addSLRScraper("virtualxporn", "VirtualXPorn", "VirtualXPorn", "https://www.virtualxporn.com/tour/custom_assets/favicons/android-chrome-192x192.png")
- addSLRScraper("vr-fan-service", "VRFanService", "VRFanService", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/153/logo_crop_1619422412.png")
- addSLRScraper("vr-pornnow", "VR Pornnow", "VR Pornnow", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/378/logo_crop_1647344034.png")
- addSLRScraper("vredging", "VRedging", "VRedging", "https://mcdn.vrporn.com/files/20200630081500/VRedging_LOGO_v1-400x400.jpg")
- addSLRScraper("vrextasy", "VReXtasy", "VReXtasy", "https://www.sexlikereal.com/s/refactor/images/favicons/android-icon-192x192.png")
- addSLRScraper("vrfirsttimer", "VRFirstTimer", "VRFirstTimer", "https://mcdn.vrporn.com/files/20200511115233/VRFirstTimers_Logo.jpg")
- addSLRScraper("vrixxens", "VRixxens", "VRixxens", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/332/logo_crop_1663682599.png")
- addSLRScraper("vrlab9division", "VRlab9division", "VRlab9division", "")
- addSLRScraper("vrmodels", "VRModels", "VRMmodels", "")
- addSLRScraper("vroomed", "VRoomed", "VRoomed", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/380/logo_crop_1647990015.png")
- addSLRScraper("vrpfilms", "VRPFilms", "VRPFilms", "https://vrpfilms.com/storage/settings/March2021/Z0krYIQBMwSJ4R1eCnv1.png")
- addSLRScraper("vrpornjack", "VRPornJack", "VRPornJack", "https://mcdn.vrporn.com/files/20210330121852/VRPORNJACK_Logo-400x400.png")
- addSLRScraper("vrpussyvision", "VRpussyVision", "VRpussyVision", "https://mcdn.vrporn.com/files/20180313160830/vrpussyvision-square-banner.png")
- addSLRScraper("vrsexperts", "VRSexperts", "VRSexperts", "https://mcdn.vrporn.com/files/20190812141431/vrsexpertslogo2.jpg")
- addSLRScraper("vrsolos", "VRSolos", "VRSolos", "https://mcdn.vrporn.com/files/20191226092954/VRSolos_Logo.jpg")
- addSLRScraper("vrstars", "VRStars", "VRStars", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/271/logo_crop_1648490662.png")
- addSLRScraper("vrvids", "VRVids", "VRVids", "https://www.sexlikereal.com/s/images/content/sexlikereal.png")
- addSLRScraper("waapvr", "WAAPVR", "WAAPVR", "https://cdn-vr.sexlikereal.com/images/studio_creatives/logotypes/1/117/logo_crop_1606868278.png")
- addSLRScraper("xvirtual", "xVirtual", "xVirtual", "")
+ var scrapers config.ScraperList
+ scrapers.Load()
+ for _, scraper := range scrapers.XbvrScrapers.SlrScrapers {
+ addSLRScraper(scraper.ID, scraper.Name, scraper.Company, scraper.AvatarUrl, false, scraper.URL)
+ }
+ for _, scraper := range scrapers.CustomScrapers.SlrScrapers {
+ addSLRScraper(scraper.ID, scraper.Name, scraper.Company, scraper.AvatarUrl, true, scraper.URL)
+ }
+
}
diff --git a/pkg/scrape/stasyqvr.go b/pkg/scrape/stasyqvr.go
index 52ad374c9..6afc2b551 100644
--- a/pkg/scrape/stasyqvr.go
+++ b/pkg/scrape/stasyqvr.go
@@ -25,6 +25,7 @@ func StasyQVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out cha
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "StasyQ"
sc.Site = siteID
diff --git a/pkg/scrape/tmwvrnet.go b/pkg/scrape/tmwvrnet.go
index eb9928015..b711c2f8e 100644
--- a/pkg/scrape/tmwvrnet.go
+++ b/pkg/scrape/tmwvrnet.go
@@ -25,6 +25,7 @@ func TmwVRnet(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out cha
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "TeenMegaWorld"
sc.Site = siteID
@@ -116,5 +117,5 @@ func TmwVRnet(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out cha
}
func init() {
- registerScraper("tmwvrnet", "TmwVRnet", "https://pbs.twimg.com/profile_images/832208391967797250/1rEowkN6_200x200.jpg", TmwVRnet)
+ registerScraper("tmwvrnet", "TmwVRnet", "https://tmwvrnet.com/assets/vr/public/tour1/images/favicon/apple-touch-icon.png", TmwVRnet)
}
diff --git a/pkg/scrape/tngf.go b/pkg/scrape/tngf.go
index cbb7d800c..40ad63488 100644
--- a/pkg/scrape/tngf.go
+++ b/pkg/scrape/tngf.go
@@ -24,6 +24,7 @@ func TNGFVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "NaughtyAmerica"
sc.Site = siteID
diff --git a/pkg/scrape/tpdb.go b/pkg/scrape/tpdb.go
index c147a57e3..a93673273 100644
--- a/pkg/scrape/tpdb.go
+++ b/pkg/scrape/tpdb.go
@@ -12,6 +12,7 @@ import (
func ScrapeTPDB(knownScenes []string, out *[]models.ScrapedScene, apiToken string, sceneUrl string) error {
sc := models.ScrapedScene{}
+ sc.ScraperID = "tpdb"
sc.SceneType = "VR"
// We accept 2 scene URL syntaxes:
diff --git a/pkg/scrape/virtualporn.go b/pkg/scrape/virtualporn.go
index ef7eef560..bdfe7ca7b 100644
--- a/pkg/scrape/virtualporn.go
+++ b/pkg/scrape/virtualporn.go
@@ -23,6 +23,7 @@ func VirtualPorn(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "BangBros"
sc.Site = siteID
diff --git a/pkg/scrape/virtualrealporn.go b/pkg/scrape/virtualrealporn.go
index b40d03901..a69628788 100644
--- a/pkg/scrape/virtualrealporn.go
+++ b/pkg/scrape/virtualrealporn.go
@@ -27,6 +27,7 @@ func VirtualRealPornSite(wg *sync.WaitGroup, updateSite bool, knownScenes []stri
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "VirtualRealPorn"
sc.Site = siteID
diff --git a/pkg/scrape/virtualtaboo.go b/pkg/scrape/virtualtaboo.go
index a693b355e..53aa7303b 100644
--- a/pkg/scrape/virtualtaboo.go
+++ b/pkg/scrape/virtualtaboo.go
@@ -27,6 +27,7 @@ func VirtualTaboo(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "VirtualTaboo"
sc.Site = siteID
diff --git a/pkg/scrape/vr3000.go b/pkg/scrape/vr3000.go
index a3ac50ff3..26cea0641 100644
--- a/pkg/scrape/vr3000.go
+++ b/pkg/scrape/vr3000.go
@@ -24,6 +24,7 @@ func VR3000(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
siteCollector.OnHTML(`.row.no-gutter`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "VR3000"
sc.Site = siteID
diff --git a/pkg/scrape/vrallure.go b/pkg/scrape/vrallure.go
index 562f66b03..d47162919 100644
--- a/pkg/scrape/vrallure.go
+++ b/pkg/scrape/vrallure.go
@@ -32,6 +32,7 @@ func VRAllure(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out cha
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "VRAllure"
sc.Site = siteID
@@ -156,5 +157,5 @@ func VRAllure(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out cha
}
func init() {
- registerScraper("vrallure", "VRAllure", "https://z5w6x5a4.ssl.hwcdn.net/sites/vra/favicon/apple-touch-icon-180x180.png", VRAllure)
+ registerScraper("vrallure", "VRAllure", "https://cdn-nexpectation.secure.yourpornpartner.com/sites/vra/favicon/apple-touch-icon-180x180.png", VRAllure)
}
diff --git a/pkg/scrape/vrbangers.go b/pkg/scrape/vrbangers.go
index a853adcb6..efe1b70ff 100755
--- a/pkg/scrape/vrbangers.go
+++ b/pkg/scrape/vrbangers.go
@@ -26,6 +26,7 @@ func VRBangersSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string, ou
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "VRBangers"
sc.Site = siteID
diff --git a/pkg/scrape/vrconk.go b/pkg/scrape/vrconk.go
index 0cba86cb1..23badefac 100644
--- a/pkg/scrape/vrconk.go
+++ b/pkg/scrape/vrconk.go
@@ -25,6 +25,7 @@ func VRCONK(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "VRCONK"
sc.Site = siteID
diff --git a/pkg/scrape/vrhush.go b/pkg/scrape/vrhush.go
index 380b95a47..43944ba10 100644
--- a/pkg/scrape/vrhush.go
+++ b/pkg/scrape/vrhush.go
@@ -27,6 +27,7 @@ func VRHush(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "VRHush"
sc.Site = siteID
@@ -149,5 +150,5 @@ func VRHush(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
}
func init() {
- registerScraper("vrhush", "VRHush", "https://z5w6x5a4.ssl.hwcdn.net/sites/vrh/favicon/apple-touch-icon-180x180.png", VRHush)
+ registerScraper("vrhush", "VRHush", "https://cdn-nexpectation.secure.yourpornpartner.com/sites/vrh/favicon/apple-touch-icon-180x180.png", VRHush)
}
diff --git a/pkg/scrape/vrlatina.go b/pkg/scrape/vrlatina.go
index 3a9bbd259..001c95169 100644
--- a/pkg/scrape/vrlatina.go
+++ b/pkg/scrape/vrlatina.go
@@ -25,6 +25,7 @@ func VRLatina(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out cha
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "VRLatina"
sc.Site = siteID
diff --git a/pkg/scrape/vrphub.go b/pkg/scrape/vrphub.go
index ef730fb9d..3f1e6274b 100644
--- a/pkg/scrape/vrphub.go
+++ b/pkg/scrape/vrphub.go
@@ -10,9 +10,9 @@ import (
"sync"
"github.com/gocolly/colly"
- "github.com/mozillazg/go-slugify"
"github.com/nleeper/goment"
"github.com/thoas/go-funk"
+ "github.com/xbapps/xbvr/pkg/config"
"github.com/xbapps/xbvr/pkg/models"
)
@@ -29,7 +29,7 @@ func getVideoName(fileUrl string) (string, error) {
return filename, nil
}
-func VRPHub(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, scraperID string, siteID string, company string, vrpCategory string, callback func(e *colly.HTMLElement, sc *models.ScrapedScene)) error {
+func VRPHub(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, scraperID string, siteID string, company string, siteURL string, callback func(e *colly.HTMLElement, sc *models.ScrapedScene)) error {
defer wg.Done()
logScrapeStart(scraperID, siteID)
@@ -55,7 +55,7 @@ func VRPHub(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
}
isPost = true
sc.SiteID = u.Query()["p"][0]
- sc.SceneID = slugify.Slugify(sc.Site) + "-" + sc.SiteID
+ sc.SceneID = "vrphub-" + sc.SiteID
})
if !isPost {
return
@@ -152,6 +152,7 @@ func VRPHub(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
// If scene exist in database, there's no need to scrape
if !funk.ContainsString(knownScenes, sceneURL) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
e.ForEach(`img.entry-thumb-main`, func(id int, e *colly.HTMLElement) {
cover := e.Attr("src")
@@ -169,7 +170,7 @@ func VRPHub(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
}
})
- siteCollector.Visit("https://vrphub.com/category/" + vrpCategory + "/")
+ siteCollector.Visit(siteURL)
if updateSite {
updateSiteLastUpdate(scraperID)
@@ -201,7 +202,7 @@ func vrhushCallback(e *colly.HTMLElement, sc *models.ScrapedScene) {
matches := vrhIdRegEx.FindStringSubmatch(tmpVideoUrls[i])
if len(matches) > 0 && len(matches[1]) > 0 {
sc.SiteID = matches[1]
- sc.SceneID = slugify.Slugify(sc.Site) + "-" + sc.SiteID
+ sc.SceneID = "vrphub-" + sc.SiteID
sceneIdFound = true
}
}
@@ -214,19 +215,36 @@ func stripzvrCallback(e *colly.HTMLElement, sc *models.ScrapedScene) {
}
}
-func addVRPHubScraper(id string, name string, company string, vrpCategory string, avatarURL string, callback func(e *colly.HTMLElement, sc *models.ScrapedScene)) {
+func addVRPHubScraper(id string, name string, company string, avatarURL string, custom bool, siteURL string, callback func(e *colly.HTMLElement, sc *models.ScrapedScene)) {
suffixedName := name + " (VRP Hub)"
+ siteNameSuffix := name
+ if custom {
+ suffixedName = name + " (Custom VRP Hub)"
+ siteNameSuffix += " (VRP Hub)"
+ }
if avatarURL == "" {
avatarURL = "https://cdn.vrphub.com/wp-content/uploads/2016/08/vrphubnew.png"
}
registerScraper(id, suffixedName, avatarURL, func(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene) error {
- return VRPHub(wg, updateSite, knownScenes, out, id, name, company, vrpCategory, callback)
+ return VRPHub(wg, updateSite, knownScenes, out, id, siteNameSuffix, company, siteURL, callback)
})
}
func init() {
- addVRPHubScraper("vrphub-vrhush", "VRHush", "VRHush", "vr-hush", "https://z5w6x5a4.ssl.hwcdn.net/sites/vrh/favicon/apple-touch-icon-180x180.png", vrhushCallback)
- addVRPHubScraper("vrphub-stripzvr", "StripzVR - VRP Hub", "StripzVR", "stripzvr", "https://www.stripzvr.com/wp-content/uploads/2018/09/cropped-favicon-192x192.jpg", stripzvrCallback)
+ var scrapers config.ScraperList
+ scrapers.Load()
+ for _, scraper := range scrapers.XbvrScrapers.VrphubScrapers {
+ switch scraper.ID {
+ case "vrphub-vrhush":
+ addVRPHubScraper(scraper.ID, scraper.Name, scraper.Company, scraper.AvatarUrl, false, scraper.URL, vrhushCallback)
+ case "vrphub-stripzvr":
+ addVRPHubScraper(scraper.ID, scraper.Name, scraper.Company, scraper.AvatarUrl, false, scraper.URL, stripzvrCallback)
+ }
+ addVRPHubScraper(scraper.ID, scraper.Name, scraper.Company, scraper.AvatarUrl, false, scraper.URL, noop)
+ }
+ for _, scraper := range scrapers.CustomScrapers.VrphubScrapers {
+ addVRPHubScraper(scraper.ID, scraper.Name, scraper.Company, scraper.AvatarUrl, true, scraper.URL, noop)
+ }
}
diff --git a/pkg/scrape/vrporn.go b/pkg/scrape/vrporn.go
index 5813ecd51..668af0b12 100644
--- a/pkg/scrape/vrporn.go
+++ b/pkg/scrape/vrporn.go
@@ -9,12 +9,12 @@ import (
"time"
"github.com/gocolly/colly"
- "github.com/mozillazg/go-slugify"
"github.com/thoas/go-funk"
+ "github.com/xbapps/xbvr/pkg/config"
"github.com/xbapps/xbvr/pkg/models"
)
-func VRPorn(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, scraperID string, siteID string, company string) error {
+func VRPorn(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, scraperID string, siteID string, company string, siteURL string) error {
defer wg.Done()
logScrapeStart(scraperID, siteID)
@@ -33,6 +33,7 @@ func VRPorn(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
}
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = company
sc.Site = siteID
@@ -41,7 +42,7 @@ func VRPorn(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
// Scene ID - get from page HTML
id := sceneIDRegEx.FindStringSubmatch(strings.TrimSpace(e.ChildAttr(`article.post`, "class")))[1]
sc.SiteID = id
- sc.SceneID = slugify.Slugify(sc.Site) + "-" + sc.SiteID
+ sc.SceneID = "vrporn-" + sc.SiteID
// Title
e.ForEach(`h1.content-title`, func(id int, e *colly.HTMLElement) {
@@ -126,7 +127,7 @@ func VRPorn(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
}
})
- siteCollector.Visit("https://vrporn.com/studio/" + scraperID + "/?sort=newest")
+ siteCollector.Visit(siteURL + "/?sort=newest")
if updateSite {
updateSiteLastUpdate(scraperID)
@@ -135,15 +136,27 @@ func VRPorn(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<
return nil
}
-func addVRPornScraper(id string, name string, company string, avatarURL string) {
- registerScraper(id, name+" (VRPorn)", avatarURL, func(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene) error {
- return VRPorn(wg, updateSite, knownScenes, out, id, name, company)
+func addVRPornScraper(id string, name string, company string, avatarURL string, custom bool, siteURL string) {
+ suffixedName := name
+ siteNameSuffix := name
+ if custom {
+ suffixedName += " (Custom VRPorn)"
+ siteNameSuffix += " (VRPorn)"
+ } else {
+ suffixedName += " (VRPorn)"
+ }
+ registerScraper(id, suffixedName, avatarURL, func(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene) error {
+ return VRPorn(wg, updateSite, knownScenes, out, id, siteNameSuffix, company, siteURL)
})
}
func init() {
- //addVRPornScraper("evileyevr", "EvilEyeVR", "EvilEyeVR", "https://mcdn.vrporn.com/files/20190605151715/evileyevr-logo.jpg")
- addVRPornScraper("randysroadstop", "Randy's Road Stop", "NaughtyAmerica", "https://mcdn.vrporn.com/files/20170718073527/randysroadstop-vr-porn-studio-vrporn.com-virtual-reality.png")
- addVRPornScraper("realteensvr", "Real Teens VR", "NaughtyAmerica", "https://mcdn.vrporn.com/files/20170718063811/realteensvr-vr-porn-studio-vrporn.com-virtual-reality.png")
- addVRPornScraper("vrclubz", "VRClubz", "VixenVR", "https://mcdn.vrporn.com/files/20200421094123/vrclubz_logo_NEW-400x400_webwhite.png")
+ var scrapers config.ScraperList
+ scrapers.Load()
+ for _, scraper := range scrapers.XbvrScrapers.VrpornScrapers {
+ addVRPornScraper(scraper.ID, scraper.Name, scraper.Company, scraper.AvatarUrl, false, scraper.URL)
+ }
+ for _, scraper := range scrapers.CustomScrapers.VrpornScrapers {
+ addVRPornScraper(scraper.ID, scraper.Name, scraper.Company, scraper.AvatarUrl, true, scraper.URL)
+ }
}
diff --git a/pkg/scrape/vrsexygirlz.go b/pkg/scrape/vrsexygirlz.go
index 84c836922..f21708d5e 100644
--- a/pkg/scrape/vrsexygirlz.go
+++ b/pkg/scrape/vrsexygirlz.go
@@ -24,6 +24,7 @@ func VRSexygirlz(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "VRSexyGirlz"
sc.Site = siteID
diff --git a/pkg/scrape/vrteenrs.go b/pkg/scrape/vrteenrs.go
index f3d3e825b..776888381 100644
--- a/pkg/scrape/vrteenrs.go
+++ b/pkg/scrape/vrteenrs.go
@@ -21,6 +21,7 @@ func VRTeenrs(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out cha
sceneCollector.OnHTML(`.list_item`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "International Media Company BV"
sc.Site = siteID
diff --git a/pkg/scrape/wankz.go b/pkg/scrape/wankz.go
deleted file mode 100644
index 27ff418e8..000000000
--- a/pkg/scrape/wankz.go
+++ /dev/null
@@ -1,157 +0,0 @@
-package scrape
-
-import (
- "strconv"
- "strings"
- "sync"
-
- "github.com/gocolly/colly"
- "github.com/mozillazg/go-slugify"
- "github.com/nleeper/goment"
- "github.com/thoas/go-funk"
- "github.com/xbapps/xbvr/pkg/models"
-)
-
-func WankzVRSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene, scraperID string, siteID string, URL string) error {
- defer wg.Done()
- logScrapeStart(scraperID, siteID)
-
- sceneCollector := createCollector("www.wankzvr.com", "www.milfvr.com", "www.tranzvr.com")
- siteCollector := createCollector("www.wankzvr.com", "www.milfvr.com", "www.tranzvr.com")
-
- sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
- sc := models.ScrapedScene{}
- sc.SceneType = "VR"
- sc.Studio = "Wankz"
- sc.Site = siteID
- sc.HomepageURL = strings.Split(e.Request.URL.String(), "?")[0]
- if strings.Contains(sc.HomepageURL, "https://www.wankzvr.com/") {
- sc.MembersUrl = strings.Replace(sc.HomepageURL, "https://www.wankzvr.com/", "https://povr.com/wankzvr/", 1)
- } else if strings.Contains(sc.HomepageURL, "https://www.milfvr.com/") {
- sc.MembersUrl = strings.Replace(sc.HomepageURL, "https://www.milfvr.com/", "https://povr.com/milfvr/", 1)
- }
-
- // Scene ID - get from URL
- tmp := strings.Split(sc.HomepageURL, "-")
- sc.SiteID = tmp[len(tmp)-1]
- sc.SceneID = slugify.Slugify(sc.Site) + "-" + sc.SiteID
-
- // Title
- e.ForEach(`h1.detail__title`, func(id int, e *colly.HTMLElement) {
- sc.Title = e.Text
- })
-
- // Date
- e.ForEach(`div.detail__date_time span.detail__date`, func(id int, e *colly.HTMLElement) {
- tmpDate, _ := goment.New(e.Text, "DD MMMM, YYYY")
- sc.Released = tmpDate.Format("YYYY-MM-DD")
- })
-
- // Duration
- e.ForEach(`div.detail__date_time span.time`, func(id int, e *colly.HTMLElement) {
- tmpDuration, err := strconv.Atoi(strings.Split(strings.TrimSpace(e.Text), " ")[0])
- if err == nil {
- sc.Duration = tmpDuration
- }
- })
-
- // Filenames
- base := e.Request.URL.Path
- base = strings.Split(strings.Replace(base, "/", scraperID+"-", -1), sc.SiteID)[0]
- sc.Filenames = append(sc.Filenames, base+"180_180x180_3dh_LR.mp4")
- sc.Filenames = append(sc.Filenames, base+"gearvr-180_180x180_3dh_LR.mp4")
- sc.Filenames = append(sc.Filenames, base+"smartphone-180_180x180_3dh_LR.mp4")
-
- // Cover URLs
- for _, x := range []string{"cover", "hero"} {
- if scraperID == "milfvr" && x == "cover" {
- continue // MilfVR does not have a "cover" image unlike WankzVR
- }
- if scraperID == "tranzvr" && x == "hero" {
- continue // TranzVR does not have a "hero" image
- }
- tmpCover := "https://cdns-i." + scraperID + ".com/" + sc.SiteID[0:1] + "/" + sc.SiteID[0:4] + "/" + sc.SiteID + "/" + x + "/large.jpg"
- if scraperID == "tranzvr" {
- tmpCover = "https://images.tranzvr.com/" + sc.SiteID[0:1] + "/" + sc.SiteID[0:4] + "/" + sc.SiteID + "/550/" + x + ".webp"
- }
- sc.Covers = append(sc.Covers, tmpCover)
- }
-
- // Gallery
- size := "1024"
- if scraperID == "milfvr" {
- size = "1280"
- }
- for _, x := range []string{"1", "2", "3", "4", "5", "6"} {
- if scraperID == "tranzvr" {
- break //TranzVR does no longer has preview images
- }
- tmpGallery := "https://cdns-i." + scraperID + ".com/" + sc.SiteID[0:1] + "/" + sc.SiteID[0:4] + "/" + sc.SiteID + "/thumbs/" + size + "_" + x + ".jpg"
- sc.Gallery = append(sc.Gallery, tmpGallery)
- }
-
- // Synopsis
- e.ForEach(`div.detail__txt`, func(id int, e *colly.HTMLElement) {
- sc.Synopsis = strings.TrimSpace(e.Text)
- })
-
- // Tags
- e.ForEach(`div.tag-list__body a.tag`, func(id int, e *colly.HTMLElement) {
- sc.Tags = append(sc.Tags, e.Text)
- })
- if scraperID == "milfvr" {
- sc.Tags = append(sc.Tags, "milf")
- }
-
- // trailer details
- sc.TrailerType = "heresphere"
- sc.TrailerSrc = "https://www.wankzvr.com/heresphere/" + sc.SiteID
-
- // Cast
- e.ForEach(`div.detail__models a`, func(id int, e *colly.HTMLElement) {
- sc.Cast = append(sc.Cast, strings.TrimSpace(e.Text))
- })
-
- out <- sc
- })
-
- siteCollector.OnHTML(`ul.pagenav__list a.pagenav__link`, func(e *colly.HTMLElement) {
- pageURL := e.Request.AbsoluteURL(e.Attr("href"))
- siteCollector.Visit(pageURL)
- })
-
- siteCollector.OnHTML(`ul.cards-list a.card__video`, func(e *colly.HTMLElement) {
- sceneURL := e.Request.AbsoluteURL(e.Attr("href"))
-
- // If scene exist in database, there's no need to scrape
- if !funk.ContainsString(knownScenes, sceneURL) && !strings.Contains(sceneURL, "/join") {
- sceneCollector.Visit(sceneURL)
- }
- })
-
- siteCollector.Visit(URL + "videos?o=d")
-
- if updateSite {
- updateSiteLastUpdate(scraperID)
- }
- logScrapeFinished(scraperID, siteID)
- return nil
-}
-
-func WankzVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene) error {
- return WankzVRSite(wg, updateSite, knownScenes, out, "wankzvr", "WankzVR", "https://www.wankzvr.com/")
-}
-
-func MilfVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene) error {
- return WankzVRSite(wg, updateSite, knownScenes, out, "milfvr", "MilfVR", "https://www.milfvr.com/")
-}
-
-func TranzVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<- models.ScrapedScene) error {
- return WankzVRSite(wg, updateSite, knownScenes, out, "tranzvr", "TranzVR", "https://www.tranzvr.com/")
-}
-
-func init() {
- registerScraper("wankzvr", "WankzVR", "https://pbs.twimg.com/profile_images/705066968986955776/3Pme_Bss_200x200.jpg", WankzVR)
- registerScraper("milfvr", "MilfVR", "https://pbs.twimg.com/profile_images/839152136449470464/Yw3Q3es2_200x200.jpg", MilfVR)
- registerScraper("tranzvr", "TranzVR", "https://pbs.twimg.com/profile_images/1038092474822979584/JduwAUTl_200x200.jpg", TranzVR)
-}
diff --git a/pkg/scrape/wetvr.go b/pkg/scrape/wetvr.go
index e41dc24fe..df256fc73 100644
--- a/pkg/scrape/wetvr.go
+++ b/pkg/scrape/wetvr.go
@@ -27,6 +27,7 @@ func WetVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out chan<-
sceneCollector.OnHTML(`div#t2019`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "WetVR"
sc.Site = siteID
diff --git a/pkg/scrape/zexywankitnow.go b/pkg/scrape/zexywankitnow.go
index cf57e9efe..2b76ae5c4 100644
--- a/pkg/scrape/zexywankitnow.go
+++ b/pkg/scrape/zexywankitnow.go
@@ -28,6 +28,7 @@ func TwoWebMediaSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string,
sceneCollector.OnHTML(`html`, func(e *colly.HTMLElement) {
sc := models.ScrapedScene{}
+ sc.ScraperID = scraperID
sc.SceneType = "VR"
sc.Studio = "2WebMedia"
sc.Site = siteID
diff --git a/pkg/tasks/content.go b/pkg/tasks/content.go
index 73c6ba0a8..624bf2f06 100644
--- a/pkg/tasks/content.go
+++ b/pkg/tasks/content.go
@@ -64,18 +64,19 @@ type BackupContentBundle struct {
Akas []models.Aka `xbvrbackup:"akas"`
}
type RequestRestore struct {
- InclAllSites bool `json:"allSites"`
- InclScenes bool `json:"inclScenes"`
- InclFileLinks bool `json:"inclLinks"`
- InclCuepoints bool `json:"inclCuepoints"`
- InclHistory bool `json:"inclHistory"`
- InclPlaylists bool `json:"inclPlaylists"`
- InclActorAkas bool `json:"inclActorAkas"`
- InclVolumes bool `json:"inclVolumes"`
- InclSites bool `json:"inclSites"`
- InclActions bool `json:"inclActions"`
- Overwrite bool `json:"overwrite"`
- UploadData string `json:"uploadData"`
+ InclAllSites bool `json:"allSites"`
+ OfficalSitesOnly bool `json:"onlyIncludeOfficalSites"`
+ InclScenes bool `json:"inclScenes"`
+ InclFileLinks bool `json:"inclLinks"`
+ InclCuepoints bool `json:"inclCuepoints"`
+ InclHistory bool `json:"inclHistory"`
+ InclPlaylists bool `json:"inclPlaylists"`
+ InclActorAkas bool `json:"inclActorAkas"`
+ InclVolumes bool `json:"inclVolumes"`
+ InclSites bool `json:"inclSites"`
+ InclActions bool `json:"inclActions"`
+ Overwrite bool `json:"overwrite"`
+ UploadData string `json:"uploadData"`
}
func CleanTags() {
@@ -142,6 +143,8 @@ func sceneDBWriter(wg *sync.WaitGroup, i *uint64, scenes <-chan models.ScrapedSc
}
func ReapplyEdits() {
+ tlog := log.WithField("task", "scrape")
+
var actions []models.Action
db, _ := models.GetDB()
defer db.Close()
@@ -159,7 +162,14 @@ func ReapplyEdits() {
Find(&actions)
}
+ actionCnt := 0
+
for _, a := range actions {
+ if actionCnt%100 == 0 {
+ tlog.Infof("Processing %v of %v edits", actionCnt+1, len(actions))
+ }
+ actionCnt += 1
+
var scene models.Scene
err := scene.GetIfExist(a.SceneID)
if err != nil {
@@ -443,7 +453,7 @@ func ImportBundleV1(bundleData ContentBundle) {
}
-func BackupBundle(inclAllSites bool, inclScenes bool, inclFileLinks bool, inclCuepoints bool, inclHistory bool, inclPlaylists bool, InclActorAkas bool, inclVolumes bool, inclSites bool, inclActions bool, playlistId string) string {
+func BackupBundle(inclAllSites bool, onlyIncludeOfficalSites bool, inclScenes bool, inclFileLinks bool, inclCuepoints bool, inclHistory bool, inclPlaylists bool, InclActorAkas bool, inclVolumes bool, inclSites bool, inclActions bool, playlistId string, outputBundleFilename string, version string) string {
var out BackupContentBundle
var content []byte
exportCnt := 0
@@ -456,6 +466,13 @@ func BackupBundle(inclAllSites bool, inclScenes bool, inclFileLinks bool, inclCu
tlog := log.WithField("task", "scrape")
tlog.Info("Backing up content bundle...")
+ if outputBundleFilename == "" {
+ outputBundleFilename = "xbvr-content-bundle.json"
+ }
+ if version == "" {
+ version = "2.1"
+ }
+
db, _ := models.GetDB()
defer db.Close()
@@ -468,8 +485,15 @@ func BackupBundle(inclAllSites bool, inclScenes bool, inclFileLinks bool, inclCu
if inclScenes || inclFileLinks || inclCuepoints || inclHistory || inclActions {
var selectedSites []models.Site
- if !inclAllSites {
- db.Where(&models.Site{IsEnabled: true}).Find(&selectedSites)
+ if !inclAllSites || onlyIncludeOfficalSites {
+ tx := db.Model(&selectedSites)
+ if !inclAllSites {
+ tx = tx.Where(&models.Site{IsEnabled: true})
+ }
+ if onlyIncludeOfficalSites {
+ tx = tx.Where("name not like ?", "%(Custom %)")
+ }
+ tx.Find(&selectedSites)
}
if playlistId != "0" {
@@ -494,8 +518,8 @@ func BackupBundle(inclAllSites bool, inclScenes bool, inclFileLinks bool, inclCu
}
// check if the scene is for a site we want
- if !inclAllSites {
- idx := FindSite(selectedSites, scene.SceneID)
+ if !inclAllSites || onlyIncludeOfficalSites {
+ idx := FindSite(selectedSites, GetScraperId(scene.SceneID, db))
if idx < 0 {
continue
}
@@ -566,7 +590,7 @@ func BackupBundle(inclAllSites bool, inclScenes bool, inclFileLinks bool, inclCu
var err error
out = BackupContentBundle{
Timestamp: time.Now().UTC(),
- BundleVersion: "2",
+ BundleVersion: version,
Volumne: volumes,
Playlists: playlists,
Sites: sites,
@@ -587,7 +611,7 @@ func BackupBundle(inclAllSites bool, inclScenes bool, inclFileLinks bool, inclCu
content, err = json.MarshalIndent(out, "", " ")
if err == nil {
- fName := filepath.Join(common.DownloadDir, "xbvr-content-bundle.json")
+ fName := filepath.Join(common.DownloadDir, outputBundleFilename)
err = ioutil.WriteFile(fName, content, 0644)
if err == nil {
tlog.Infof("Backup file generated in %v, %v scenes selected, ready to download", time.Since(t0), exportCnt)
@@ -624,16 +648,23 @@ func RestoreBundle(request RequestRestore) {
json.UnmarshalFromString(request.UploadData, &bundleData)
if err == nil {
- if bundleData.BundleVersion != "2" {
- tlog.Infof("Restore Failed! Bundle file is version %v, version %v expected", bundleData.BundleVersion, 2)
+ if bundleData.BundleVersion != "2.1" {
+ tlog.Infof("Restore Failed! Bundle file is version %v, version %v expected", bundleData.BundleVersion, "2.1")
return
}
db, _ := models.GetDB()
defer db.Close()
var selectedSites []models.Site
- if !request.InclAllSites {
- db.Where(&models.Site{IsEnabled: true}).Find(&selectedSites)
+ if !request.InclAllSites || request.OfficalSitesOnly {
+ tx := db.Model(&selectedSites)
+ if !request.InclAllSites {
+ tx = tx.Where(&models.Site{IsEnabled: true})
+ }
+ if request.OfficalSitesOnly {
+ tx = tx.Where("name not like ?", "%(Custom %)")
+ }
+ tx.Find(&selectedSites)
}
if request.InclVolumes {
@@ -695,7 +726,7 @@ func RestoreScenes(scenes []models.Scene, inclAllSites bool, selectedSites []mod
}
// check if the scene is for a site we want
if !inclAllSites {
- idx := FindSite(selectedSites, scene.SceneID)
+ idx := FindSite(selectedSites, scene.ScraperId)
if idx < 0 {
continue
}
@@ -739,7 +770,7 @@ func RestoreCuepoints(sceneCuepointList []BackupSceneCuepoint, inclAllSites bool
}
// check if the scene is for a site we want
if !inclAllSites {
- idx := FindSite(selectedSites, cuepoints.SceneID)
+ idx := FindSite(selectedSites, GetScraperId(cuepoints.SceneID, db))
if idx < 0 {
continue
}
@@ -788,7 +819,7 @@ func RestoreSceneFileLinks(backupFileList []BackupFileLink, inclAllSites bool, s
// check if the scene is for a site we want
if !inclAllSites {
- idx := FindSite(selectedSites, backupSceneFiles.SceneID)
+ idx := FindSite(selectedSites, GetScraperId(backupSceneFiles.SceneID, db))
if idx < 0 {
continue
}
@@ -838,7 +869,7 @@ func RestoreHistory(sceneHistoryList []BackupSceneHistory, inclAllSites bool, se
}
// check if the scene is for a site we want
if !inclAllSites {
- idx := FindSite(selectedSites, histories.SceneID)
+ idx := FindSite(selectedSites, GetScraperId(histories.SceneID, db))
if idx < 0 {
continue
}
@@ -895,7 +926,7 @@ func RestoreActions(sceneActionList []BackupSceneAction, inclAllSites bool, sele
}
// check if the scene is for a site we want
if !inclAllSites {
- idx := FindSite(selectedSites, actions.SceneID)
+ idx := FindSite(selectedSites, GetScraperId(actions.SceneID, db))
if idx < 0 {
continue
}
@@ -1086,19 +1117,21 @@ func CountTags() {
actor.CountActorTags()
}
-func FindSite(sites []models.Site, findSite string) int {
- findSite = strings.Replace(findSite, "-", "", -1)
- findSite = strings.Replace(findSite, " ", "", -1)
+func FindSite(sites []models.Site, scraperId string) int {
for i, site := range sites {
- id := strings.Replace(site.ID, "-", "", -1)
- id = strings.Replace(id, " ", "", -1)
- if strings.HasPrefix(findSite, id) {
+ if scraperId == site.ID {
return i
}
}
return -1
}
+func GetScraperId(sceneId string, db *gorm.DB) string {
+ var scene models.Scene
+ db.Where(models.Scene{SceneID: sceneId}).First(&scene)
+ return scene.ScraperId
+}
+
func CheckCuepoint(cuepoints []models.SceneCuepoint, findCuepoint models.SceneCuepoint) (int, bool) {
for i, cuepoint := range cuepoints {
if cuepoint.TimeStart == findCuepoint.TimeStart {
diff --git a/ui/src/locales/en-GB.json b/ui/src/locales/en-GB.json
index 7b3c739c8..e252fcff2 100644
--- a/ui/src/locales/en-GB.json
+++ b/ui/src/locales/en-GB.json
@@ -111,5 +111,7 @@
"Reset Rating": "Reset Rating",
"Attributes": "Attributes",
"Hidden": "Hidden",
+ "Only include offical studios": "Only include offical studios",
+ "You should exclude Studios from your Custom list (scrapers.json) if sharing data with others": "You should exclude Studios from your Custom list (scrapers.json) if sharing data with others",
"Go": "Go"
}
diff --git a/ui/src/views/options/sections/OptionsSceneDataImportExport.vue b/ui/src/views/options/sections/OptionsSceneDataImportExport.vue
index 7afcc81c6..926f1b724 100644
--- a/ui/src/views/options/sections/OptionsSceneDataImportExport.vue
+++ b/ui/src/views/options/sections/OptionsSceneDataImportExport.vue
@@ -23,6 +23,13 @@
+
+
+ {{$t("Only include offical studios")}}
+
+
{
+ ky.get('/api/task/bundle/backup', { timeout: false, searchParams: { allSites: this.allSites == "true", onlyIncludeOfficalSites: this.onlyIncludeOfficalSites, inclScenes: this.includeScenes, inclHistory: this.includeHistory, inclLinks: this.includeFileLinks, inclCuepoints: this.includeCuepoints, inclActions: this.includeActions, inclPlaylists: this.includePlaylists, inclActorAkas: this.includeActorAkas, inclVolumes: this.includeVolumes, inclSites: this.includeSites, playlistId: this.currentPlaylist, download: true } }).json().then(data => {
const link = document.createElement('a')
link.href = this.myUrl
link.click()
diff --git a/ui/src/views/options/sections/OptionsSceneDataScrapers.vue b/ui/src/views/options/sections/OptionsSceneDataScrapers.vue
index dca734c56..b8cb311f5 100644
--- a/ui/src/views/options/sections/OptionsSceneDataScrapers.vue
+++ b/ui/src/views/options/sections/OptionsSceneDataScrapers.vue
@@ -95,7 +95,7 @@ export default {
this.$buefy.toast.open(`Scenes from ${site} will be updated on next scrape`)
},
deleteScenes (site) {
- site = this.sanitizeSiteName(site);
+ site = this.sanitizeSiteName(site);
this.$buefy.dialog.confirm({
title: this.$t('Delete scraped scenes'),
message: `You're about to delete scraped scenes for ${site}. Previously matched files will return to unmatched state.`,
@@ -109,6 +109,9 @@ export default {
})
},
sanitizeSiteName(site) {
+ if (site.includes('(Custom ')) {
+ return site.replace('(Custom ','(')
+ }
return site.split('(')[0].trim();
},
parseISO,