Plombo / vcromclaim

A program to extract ROMs, manuals, and saves from Wii Virtual Console games in a NAND dump
68 stars 14 forks source link

Filename generation scheme considered harmful #9

Open stan423321 opened 6 years ago

stan423321 commented 6 years ago

The way program appears to work right now is that it extracts internal game titles, then inserts them directly into templates for filenames. This behavior causes a variety of problems. I am not sure if submitting them as one issue is perfect, but they stem from this single behavior. Following are symptoms on Windows NTFS partition.

Based on the above, I would suggest implementing some kind of a different naming scheme, however the choice of specifics is not apparent and thus I don't want to force any particular suggestions.

JanErikGunnar commented 6 years ago

This is the same as issue #7

As mentioned there, a workaround is to change line 37 of wiimetadata.py FROM: self.name = name TO: self.name = id

Although it gives everything very ugly filenames. I don't know much Python, I'm guessing it should be fairly easy to filter any non-A-Z/numerical (to fix "1A"), trim head and tail whitespace (to fix "1B") and to perhaps append console (SMS, MD, SNES, etc) or some ID (all games have an 8 character hexadecimal ID and another 4-character alphabetical ID, e.g. "JMVA") to all titles to fix "2".

JanErikGunnar commented 6 years ago

I've made a fix that should resolve all the issues except the one with duplicated games (Sonic the Hedgehog). Basically everything that are not known safe characters are stripped from the file name. I've made a pull request, meanwhile you can download my fork.