DblK / tinshop

Tinshop is your own personal shop compatible with tinfoil
GNU Affero General Public License v3.0
46 stars 4 forks source link

Folder structure may cause false duplicates #50

Open Helvio88 opened 1 year ago

Helvio88 commented 1 year ago

I noticed that if I organize my files in a specific structure:

/games/Game Name [12345TITLEID0000]/Game Name [12345TITLEID0000][v0].nsz (Base) /games/Game Name [12345TITLEID0000]/Game Name [12345TITLEID1000][v65536].nsz (Update) /games/Game Name [12345TITLEID0000]/Game Name (DLC)[12345TITLEID0001][v0].nsz (DLC)

Then the Title ID in the folder name makes all files be recognized as duplicates. Perhaps the folder path should be ignored in this comparison: https://github.com/DblK/tinshop/blob/00dd92e709d03f67f60fb2fc6b0d90ab70767ba0/gamescollection/collection.go#L231

Removing the [TITLE_ID] from the Folder fixed the duplication issue.

DblK commented 1 year ago

Hi, Good catch. I will try to make a fix soon for this.