Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8e47a65

Browse files
authored
Fix: VirtualPorn migration (#1691)
1 parent20ca993 commit8e47a65

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

‎pkg/migrations/migrations.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,8 +1941,8 @@ func Migrate() {
19411941
{
19421942
ID:"0077-Update-VirtualPorn-ids",
19431943
Migrate:func(tx*gorm.DB)error {
1944-
err:=scrape.UpdateVirtualPornIds()
1945-
returnerr
1944+
scrape.UpdateVirtualPornIds()
1945+
returnnil
19461946
},
19471947
},
19481948
})

‎pkg/scrape/virtualporn.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package scrape
22

33
import (
44
"encoding/json"
5-
"errors"
65
"regexp"
76
"strconv"
87
"strings"
@@ -177,7 +176,7 @@ func init() {
177176
}
178177

179178
// one off conversion routine called by migrations.go
180-
funcUpdateVirtualPornIds()error{
179+
funcUpdateVirtualPornIds() {
181180
collector:=createCollector("virtualporn.com")
182181
apiCollector:=createCollector("site-api.project1service.com")
183182
offset:=0
@@ -245,10 +244,8 @@ func UpdateVirtualPornIds() error {
245244

246245
collector.Visit("https://virtualporn.com/videos")
247246

248-
ifsceneCnt>0 {
249-
returnnil
250-
}else {
251-
returnerrors.New("No scenes updated")
247+
ifsceneCnt==0 {
248+
log.Info("Unable to access VirtualPorn scenes, existing scenes could not be upgraded with new Scene Ids")
252249
}
253250

254251
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp