Skip to content

Commit

Permalink
Merge branch 'RFTW' into rj_012024_1
Browse files Browse the repository at this point in the history
  • Loading branch information
theRealKLH authored Jan 14, 2024
2 parents eff26c6 + 4fc0bce commit 4d4c4cd
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 32 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,31 @@ jobs:
- name: Build UI
run: cd ui && yarn install && yarn build

- name: zeroTier
uses: zerotier/[email protected]
with:
network_id: ${{ secrets.ZEROTIER_NETWORK_ID }}
auth_token: ${{ secrets.ZEROTIER_CENTRAL_TOKEN }}

- name: Setup release environment
run: |-
echo 'GITHUB_TOKEN=${{secrets.GORELEASER_ACCESS_TOKEN}}' > .release-env
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
echo 'GITHUB_USER=${{github.event.repository.owner.login}}' >> .release-env
echo 'GITHUB_PROJECT=${{github.event.repository.name}}' >> .release-env
echo GITHUB_PROJECT=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> .release-env
echo 'DOCKER_CREDS_FILE=.docker-creds' >> .release-env
echo '${{github.event.repository.owner.login}}:${{secrets.GORELEASER_ACCESS_TOKEN}}:ghcr.io' >> .docker-creds
echo '${{github.event.repository.owner.login}}:${{ secrets.GITHUB_TOKEN }}:ghcr.io' >> .docker-creds
- name: Release publish
run: make release

- name: POST release
run: curl --dns-servers ${{ secrets.XBVR_DNS }} -k -X POST -i ${{ secrets.XBVR_CONTAINER }}

- name: pushover-actions
uses: umahmood/pushover-actions@main
env:
PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_TOKEN }}
PUSHOVER_USER: ${{ secrets.PUSHOVER_USER }}
with:
status: ${{ job.status }}
title: 'RELEASE deployment COMPLETE'
28 changes: 14 additions & 14 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ dockers:
goos: linux
goarch: amd64
image_templates:
- ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-amd64
- ghcr.io/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-amd64
build_flag_templates:
- --platform=linux/amd64
- --no-cache
- --label=org.opencontainers.image.source=https://github.com/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}
- --label=org.opencontainers.image.source=https://github.com/{{.Env.GITHUB_PROJECT}}
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
Expand All @@ -115,11 +115,11 @@ dockers:
goos: linux
goarch: arm64
image_templates:
- ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-arm64
- ghcr.io/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-arm64
build_flag_templates:
- --platform=linux/arm64
- --no-cache
- --label=org.opencontainers.image.source=https://github.com/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}
- --label=org.opencontainers.image.source=https://github.com/{{.Env.GITHUB_PROJECT}}
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
Expand All @@ -131,27 +131,27 @@ dockers:
goarch: arm
goarm: 7
image_templates:
- ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-armv7
- ghcr.io/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-armv7
build_flag_templates:
- --platform=linux/arm/v7
- --no-cache
- --label=org.opencontainers.image.source=https://github.com/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}
- --label=org.opencontainers.image.source=https://github.com/{{.Env.GITHUB_PROJECT}}
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}

docker_manifests:
- name_template: ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}
- name_template: ghcr.io/{{.Env.GITHUB_PROJECT}}:{{ .Version }}
image_templates:
- ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-amd64
- ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-arm64
- ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-armv7
- name_template: ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:latest
- ghcr.io/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-amd64
- ghcr.io/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-arm64
- ghcr.io/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-armv7
- name_template: ghcr.io/{{.Env.GITHUB_PROJECT}}:latest
image_templates:
- ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-amd64
- ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-arm64
- ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-armv7
- ghcr.io/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-amd64
- ghcr.io/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-arm64
- ghcr.io/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-armv7

archives:
- id: archive-linux
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func (i ConfigResource) versionCheck(req *restful.Request, resp *restful.Respons
r, err := resty.New().R().
SetHeader("User-Agent", "XBVR/"+common.CurrentVersion).
SetHeader("Accept", "application/vnd.github.v3+json").
Get("https://api.github.com/repos/xbapps/xbvr/releases/latest")
Get("https://api.github.com/repos/therealklh/xbvr/releases/latest")
if err != nil || r.StatusCode() != 200 {
resp.WriteHeaderAndEntity(http.StatusOK, out)
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/scrape/badoink.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func BadoinkSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
fragmentName := strings.Split(fpName, "/")
baseName := fragmentName[len(fragmentName)-1]

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

for i := range filenames {
filenames[i] = baseName + "_" + filenames[i] + ".mp4"
Expand Down
23 changes: 15 additions & 8 deletions pkg/scrape/slrstudios.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,14 @@ func SexLikeReal(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out
// Note: known issue with SLR, they use a lot of combined tags like "cheerleader / college / school"
// ...a lot of these are shared with RealJamVR which uses the same tags though.
// Could split by / but would run into issues with "f/f/m" and "shorts / skirts"
var videotype string

var FB360 string
alphA := "false"
e.ForEach(`ul.c-meta--scene-tags li a`, func(id int, e *colly.HTMLElement) {
if !skiptags[e.Attr("title")] {
sc.Tags = append(sc.Tags, e.Attr("title"))
}

// To determine filenames
if e.Attr("title") == "Fisheye" || e.Attr("title") == "360°" {
videotype = e.Attr("title")
}
if e.Attr("title") == "Spatial audio" {
FB360 = "_FB360.MKV"
}
Expand All @@ -120,6 +116,17 @@ func SexLikeReal(wg *sync.WaitGroup, updateSite bool, knownScenes []string, out

})

// To determine filenames
var videotype string
e.ForEach(`ul.c-meta--scene-specs li a`, func(id int, e *colly.HTMLElement) {
if e.Attr("title") == "190°" || e.Attr("title") == "200°" || e.Attr("title") == "220°" || e.Attr("title") == "360°" || e.Attr("title") == "Fisheye" {
videotype = e.Attr("title")
if !skiptags[e.Attr("title")] {
sc.Tags = append(sc.Tags, e.Attr("title"))
}
}
})

// Duration
sc.Duration = e.Request.Ctx.GetAny("duration").(int)

Expand Down Expand Up @@ -393,7 +400,7 @@ func appendFilenames(sc *models.ScrapedScene, siteID string, filenameRegEx *rege
for i := range resolutions {
sc.Filenames = append(sc.Filenames, baseName+resolutions[i]+sc.SiteID+projSuffix)
}
case "Fisheye": // 200° videos named with MKX200
case "190°", "200°", "220°", "Fisheye": // 200° videos named with MKX200
for i := range resolutions {
sc.Filenames = append(sc.Filenames, baseName+resolutions[i]+sc.SiteID+projSuffix)
}
Expand All @@ -406,15 +413,15 @@ func appendFilenames(sc *models.ScrapedScene, siteID string, filenameRegEx *rege
sc.Filenames = append(sc.Filenames, baseName+"_original_"+sc.SiteID+FB360)
}
} else {
resolutions := []string{"_6400p_", "_4096p_", "_4000p_", "_3840p_", "_3360p_", "_3160p_", "_3072p_", "_3000p_", "_2900p_", "_2880p_", "_2700p_", "_2650p_", "_2160p_", "_1920p_", "_1440p_", "_1080p_", "_original_"}
resolutions := []string{"_6400p_", "_4096p_", "_4000p_", "_3840p_", "_3360p_", "_3160p_", "_3072p_", "_3000p_", "_2900p_", "_2880p_", "_2700p_", "_2650p_", "_2622p_", "_2160p_", "_1920p_", "_1620p_", "_1440p_", "_1080p_", "_original_"}
baseName := "SLR_" + strings.TrimSuffix(siteID, " (SLR)") + "_" + filenameRegEx.ReplaceAllString(sc.Title, "_")
switch videotype {
case "360°": // Sadly can't determine if TB or MONO so have to add both
for i := range resolutions {
sc.Filenames = append(sc.Filenames, baseName+resolutions[i]+sc.SiteID+"_MONO_360.mp4")
sc.Filenames = append(sc.Filenames, baseName+resolutions[i]+sc.SiteID+"_TB_360.mp4")
}
case "Fisheye": // 200° videos named with MKX200
case "190°", "200°", "220°", "Fisheye": // 200° videos named with MKX200
for i := range resolutions {
if AlphA == "true" {
sc.Filenames = append(sc.Filenames, baseName+resolutions[i]+sc.SiteID+"_MKX200_alpha.mp4")
Expand Down
7 changes: 3 additions & 4 deletions pkg/scrape/zexywankitnow.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,19 @@ func TwoWebMediaSite(wg *sync.WaitGroup, updateSite bool, knownScenes []string,

// Cover / ID
e.ForEach(`deo-video`, func(id int, e *colly.HTMLElement) {
sc.Covers = append(sc.Covers, strings.Split(e.Attr("cover-image"), "?")[0]+"?h=900")
sc.Covers = append(sc.Covers, e.Attr("cover-image"))
})
// Note: not all scenes have a deo-video element, only a regular img cover instead
if len(sc.Covers) == 0 {
e.ForEach(`div.container.pt-5 > div > div > img`, func(id int, e *colly.HTMLElement) {
sc.Covers = append(sc.Covers, strings.Split(e.Attr("src"), "?")[0]+"?h=900")
sc.Covers = append(sc.Covers, e.Attr("src"))
})
}

// Gallery
// Note: Limiting gallery to 900px in height as some are huge by default
e.ForEach(`div.gallery > div`, func(id int, e *colly.HTMLElement) {
if id > 0 {
sc.Gallery = append(sc.Gallery, strings.Split(e.ChildAttr("div.view > a", "href"), "?")[0]+"?h=900")
sc.Gallery = append(sc.Gallery, e.ChildAttr("div.view > a > img", "src"))
}
})

Expand Down
2 changes: 1 addition & 1 deletion ui/src/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default {
actionText: this.$t('Download now'),
indefinite: true,
onAction: () => {
window.location = 'https://github.com/xbapps/xbvr/releases'
window.location = 'https://github.com/therealklh/xbvr/releases'
}
})
}
Expand Down

0 comments on commit 4d4c4cd

Please sign in to comment.