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
308 stars 16 forks source link

Add output token matching for "Famicom" and "Super Famicom" #1043

Closed kerobaros closed 3 months ago

kerobaros commented 3 months ago

Is your feature request related to a problem?

I'm currently attempting to use igir to scan in both a subset of the No-Intro dats and the matching RetroPlay English translation dats, and it's working great. I'm then using the link command to produce filesets for my various emulator handhelds to sync over to their SD cards, and it is working almost perfectly.

The command I'm using is as follows:

#!/bin/sh

OUTPUT_PATH="ES-DE"
TOKEN="{es}"

npx igir@latest link \
    --dat No-Intro*.zip \
    --input sorted/No-Intro/ \
    --output output/$OUTPUT_PATH/$TOKEN/ \
    --single \
    --no-bios \
    --no-unlicensed \
    --prefer-retail \
    --prefer-language En,Ja \
    --prefer-region USA,WORLD,EUR \
    --prefer-revision-newer \
    --prefer-ntsc \
    #--dir-letter \
    #--dir-letter-group \
    #--dir-letter-limit 200

npx igir@latest link \
    --dat T-En*.zip \
    --input sorted/T-En/ \
    --output output/$OUTPUT_PATH/$TOKEN/T-En/

This creates the expected links, except it does not create T-En directories for the NES or SNES, and I believe this is because the NES and SNES T-En dats are named "Nintendo - Famicom" and "Nintendo - Super Famicom" instead of the western console names.

Describe the solution you'd like

I'm not well-versed in TypeScript, but it appears that matching a file to an output token is done in src/types/gameConsole.ts. Would it be possible to add matches for "Famicom" and "Super Famicom" to the NES and SNES output tokens, respectively?

Additional context

Here are examples of the dats I am referencing, if you don't have them already.

Nintendo - Famicom [T-En] Collection (16-03-2024).zip

Nintendo - Super Famicom [T-En] Collection (13-03-2024).zip

kerobaros commented 3 months ago

Update: the expected behavior occurs when using the following script to extract the roms for a TwilightMenu setup; to wit, the Famicom and Super Famicom dats listed above extract their roms into the correct nes/T-En and snes/T-En directories. I haven't the foggiest what the difference is.

!/usr/bin/sh

OUTPUT_PATH="TwilightMenu"
TOKEN="{twmenu}"

npx igir@latest copy extract test clean \
    --dat No-Intro*.zip \
    --dat-name-regex-exclude "/encrypted|headerless/i" \
    --input sorted/No-Intro/ \
    --input-exclude "sorted/No-Intro/*Headerless*" \
    --output output/$OUTPUT_PATH/$TOKEN/ \
    --single \
    --no-bios \
    --no-unlicensed \
    --prefer-retail \
    --prefer-language En,Ja \
    --prefer-region USA,WORLD,EUR \
    --prefer-revision-newer \
    --prefer-ntsc \
    #--dir-letter \
    #--dir-letter-group \
    #--dir-letter-limit 200

npx igir@latest copy extract test clean \
    --dat T-En*.zip \
    --input sorted/T-En/ \
    --output output/$OUTPUT_PATH/$TOKEN/T-En/

Sorry for accidentally closing and re-opening the issue, hit the wrong button.

emmercm commented 3 months ago

Can confirm that this is definitely an oversight, I'll work on fixing it. Thank you for the report!

github-actions[bot] commented 2 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.