fix GetIGDBAppParent
Some checks failed
docker / prepare-and-build (push) Successful in 5m21s
release / goreleaser (push) Has been cancelled

This commit is contained in:
Nite07 2024-11-23 02:27:53 +08:00
parent 543210a4ae
commit 4490c817db
3 changed files with 8 additions and 8 deletions

View File

@ -99,16 +99,16 @@ func GetIGDBAppParent(id int) (int, error) {
if err != nil {
return 0, err
}
versionParent := detail.VersionParent
for versionParent != 0 {
detail, err = GetIGDBAppDetailCache(versionParent)
hasParent := false
for detail.VersionParent != 0 {
hasParent = true
detail, err = GetIGDBAppDetailCache(detail.VersionParent)
if err != nil {
return 0, err
}
versionParent = detail.VersionParent
}
if versionParent != 0 {
return versionParent, nil
if hasParent {
return detail.ID, nil
}
return id, nil
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long