SteamGridDB / steam-rom-manager

An app for managing ROMs in Steam
GNU General Public License v3.0
1.79k stars 119 forks source link

Do not strip duplicate names for matches #605

Closed sairuk closed 2 months ago

sairuk commented 7 months ago

I am running into an issue where games from the same series across different parser configs are stripped out during parser run, this is not desired behaviour for my setup. I can work around this by forcing different titles but this is undesirable, I wouldn't have expected this to come into effect across parsers

e.g. game for c64 is dropped as a duplicate, the c64 parser is processed after nes

$ cat nes/Skate or Die.desktop
[Desktop Entry]
Name=Skate or Die
Comment=Skate or Die
Exec=/usr/bin/mame nes -cart "skateord"
Path=/home/user/.mame
Icon=mame
Terminal=false
Type=Application
Categories=Game;
$ cat c64/Skate or Die.desktop
[Desktop Entry]
Name=Skate or Die
Comment=Skate or Die
Exec=/usr/bin/mame c64p -cass "skateord"
Path=/home/user/.mame
Icon=mame
Terminal=false
Type=Application
Categories=Game;

workaround, update the name entry for the c64 to have an alt name

$ cat c64/Skate or Die.desktop
[Desktop Entry]
Name=Skate or Die (c64)
Comment=Skate or Die
Exec=/usr/bin/mame c64p -cass "skateord"
Path=/home/user/.mame
Icon=mame
Terminal=false
Type=Application
Categories=Game;
kencinder commented 2 months ago

I cannot replicate this behaviour, there are numerous titles across various systems that are the same and I have never seen this happen.

Tested on Windows, 2 Shortcut parsers pointed at c64 and nes directories containing a Skate or Die shortcut. Both are added just fine. Even when using the same category for both parsers, no issue.

image

cbartondock commented 2 months ago

Might be a bug related to .desktop parsing?

cbartondock commented 2 months ago

Okay I replicated the bug, it indeed only happens with shortcut passthrough. This will get fixed.

cbartondock commented 2 months ago

I take it back, the only case I am able to reproduce this is when the "Full Shortcut" ends up being the same, which is the intended behavior since Steam can't add multiple shortcuts with the exact same path.

cbartondock commented 2 months ago

Looking at it carefully, I believe the only way this can happen is if the appId for the two apps is the same, which is a hash function of their full shortcut value and their title. Check in the parser tests to see if this is indeed the case for your apps (send screenshots), I will re-open if not.