emmercm / igir

🕹 A video game ROM collection manager to help filter, sort, patch, archive, and report on collections on any OS.
https://igir.io/
GNU General Public License v3.0
328 stars 16 forks source link

--prefer-revision-newer or --prefer-revision-older has no impact on ROM selection #987

Closed halsafar closed 4 months ago

halsafar commented 4 months ago

Paste the command

igir -vv link clean \ --symlink \ --input 'ni-roms/roms/Nintendo - Nintendo Entertainment System (Headered)/' \ --dat '.dats/Nintendo - Nintendo Entertainment System (Headered) (20240304-091200).dat' \ --output /nes/roms/igir/ \ --filter-language EN \ --filter-region "USA,WORLD" \ --filter-regex-exclude "GameCube Edition|Virtual Console|e-Reader Edition" \ --no-bios \ --no-device \ --no-bios \ --no-demo \ --no-beta \ --no-sample \ --no-prototype \ --no-test-roms \ --no-aftermarket \ --single \ --prefer-retail \ --prefer-revision-newer

Describe the bug

Ends up copying two versions of the same game.

Expected behavior

Should only end up with the latest version of a game.

Debug logs

INFO:  CandidateWriter: Nintendo - Nintendo Entertainment System (Headered): Legend of Zelda, The (USA): creating symlink '/ni-roms/roms/Nintendo - Nintendo Entertainment      System (Headered)/Legend of Zelda, The (USA).zip' -> '/nes/roms/igir/Legend of Zelda, The (USA).zip' 

INFO:  CandidateWriter: Nintendo - Nintendo Entertainment System (Headered): Legend of Zelda, The (USA) (Rev 1): creating symlink '/ni-roms/roms/Nintendo - Nintendo            Entertainment System (Headered)/Legend of Zelda, The (USA) (Rev 1).zip' -> '/nes/roms/igir/Legend of Zelda, The (USA) (Rev 1).zip'

DAT(s) used

Nintendo - Nintendo Entertainment System (Headered) (20240304-091200).dat

igir version

2.5.0

Node.js version

N/A

Operating system

Linux

Additional context

Same outcome if I use --prefer-revision-older or do not include the argument at all.

halsafar commented 4 months ago

If I remove:

--filter-region "USA,WORLD" \

Then it seems to behave properly and it honors the --prefer-revision settings.

However now I end up with roms from regions I do not want.

emmercm commented 4 months ago

Very interesting, I'm surprised no one has reported this bug yet 🙂. The issue is Legend of Zelda, The (Europe) (Rev 1) is the "parent" and it was filtered out before preferences were applied - effectively orphaning the children, making them all think they are separate.

This is definitely a serious bug, I'll work on it.

halsafar commented 4 months ago

Nice! Excellent turn around on that one. Thank you so much. Going to try running from source and test it out.

For years I maintained my own scripts that did similar to what igir does but it was all hacky work never meant to be anything I maintained for so long. I stumbled upon igir a few days ago and I've already replaced years of custom scripts with it. The only thing holding me back from finalizing the transition was this bug. Thanks again!

emmercm commented 4 months ago

Thank you for the kind words @halsafar! I love to hear that my efforts are enjoyed by others.

I just started a megathread discussion for people to highlight their use cases, I would love to hear about yours!

github-actions[bot] commented 3 months ago

:lock: Inactive issue lock

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Comment generated by the GitHub Lock Issues workflow.