trembon / switch-library-manager

Complete solution to manage, organize and keep your local switch backup game library up to date . Cross platform, supports all game formats.
MIT License
46 stars 2 forks source link

Something's strange about the way SLM 1.5.0 sees a couple of the "Arcade Archive" titles #21

Closed SteveMyers75 closed 5 months ago

SteveMyers75 commented 5 months ago

When I scan, it sees "Arcade Archives BLOCK HOLE[01009E7013B2C000][v0].nsp" and "Arcade Archives LIQUID KIDS[01009E7013B2A000][v0].nsp" as both being BLOCK HOLE and says there's a "duplicate base file" ISSUE

I verified that they are actully two completely different games. (One is from TAITO and the other is from KONAMI) Both play just fine.

If I delete the file "Arcade Archives BLOCK HOLE[01009E7013B2C000][v0].nsp", the error goes away but it lists Title:BLOCK HOLE as using File: "Arcade Archives LIQUID KIDS[01009E7013B2A000][v0].nsp"

trembon commented 5 months ago

could be an error within the titlesdb file as well, but i will try to have a look at it to see what i can find

SteveMyers75 commented 5 months ago

I haven't figured out where he fixed it yet, but the @pedro-dro fork fixed this issue.

https://github.com/pedro-dro/switch-library-manager

SteveMyers75 commented 5 months ago

OK, I see where @pedro-dro fixed this issue.

It's in the fixes list under: "- First 13 ID hexadecimal chars are used to get title information instead of 12. It caused "Duplicate game base" on games with the same first ID 12 hexadecimal chars"

in db\localSwitchFilesDB.go

            idPrefix := metadata.TitleId[0 : len(metadata.TitleId)-4]               id := metadata.TitleId
            idPrefix := id[0 : len(id)-3]
            if !(strings.HasSuffix(id, "000") || strings.HasSuffix(id, "800")) {
                intVar, _ := strconv.ParseUint(id[len(id)-4:len(id)-3], 16, 64)
                h := fmt.Sprintf("%x", intVar-1)
                idPrefix = id[0:len(id)-4] + h
            }

The two titles I had issues with both start with ID 01009E7013B2xxxx 01009E7013B2C000 and 01009E7013B2A000

https://github.com/giwty/switch-library-manager/commit/eba1b53c2ec206197c0b9493afec4dd3d04bbbdc
At line #211 shows the change

trembon commented 5 months ago

thanks for the find, either you can create a PR yourself or i will try to merge it when easter is over and i have some time at the computer again

trembon commented 5 months ago

i think i have applied all needed code in this code base as well now so you should be able to test with the latest build available under the Actions tab works for me when testing with this build

SteveMyers75 commented 5 months ago

That did it, Thanks! Tested and working properly