Closed kalimag closed 3 months ago
Also, the double quotes around the file name in .cue files are optional if the file name does not contain whitespace, while the script assumes they're always there. I haven't found any examples of unquoted file names in .cue files myself, but it's a theoretical source of error.
I have no issues with table_subtract just being made case-insensitive, based on the way it's being used, but that would break some weird edge cases on Linux (which currently isn't supported anyways, so a pointless issue).
BizHawk actually uses a much more complicated file lookup that mostly ignores file extensions and is case insensitive even on Linux.
This is mostly resolved now in 75b71d4, acc35cc and dfbb142ea9ad817708714ce4d149f8c05ae2efb4 (#58).
BizHawk is very flexible about cue files, and can for example fall back to a foo.mp3
if it can't find a foo.bin
audio track listed in the .cue, so it's still possible that the shuffler chokes on weird compressed discs that BizHawk can successfully load.
The way
get_games_list
removes data files referenced in cue/ccd/xml files is case sensitive, so if a .cue file contains the stringFILE "FOO.BIN" BINARY
but the associated file is namedfoo.bin
, it will not be removed from the games list, and cause issues when the script tries to load it as a ROM.BizHawk will open such cue files without issue (at least on Windows), so the source of the problem will not be obvious to the user, and I've seen a couple of disc images with inconsistent casing like that "in the wild".
https://github.com/authorblues/bizhawk-shuffler-2/blob/7545ddd025e66537fd3b6f1549c7665657f9a7c2/shuffler.lua#L182-L184
https://github.com/authorblues/bizhawk-shuffler-2/blob/7545ddd025e66537fd3b6f1549c7665657f9a7c2/shuffler.lua#L103-L113
table_subtract
uses table lookups, and string keys are case-sensitive. The easiest solution may be to add an alternativetable_subtract
implementation which uses:lower()
on the table keys in the temporary table (with an OS check?).