Hard Region Detection favors first hard region in filename which may not be desired
Closed this issue · 2 comments
Concerned project
Batocera
Distribution Version
V39
Architecture
X86_64
Issue description
d8ba232 introduced hard region detection.. which is great; however, what happens if the filename has multiple hard regions? Right now, the first hard region in the filename is used, but this might not always be desired.
Sometimes the NoIntro naming convention has multiple regions listed in the filename.
For example on N64:
1080 Snowboarding (Japan, USA) (En,Ja)
or on Master System:
Astro Warrior (Japan, USA, Brazil) (En)
Great Ice Hockey (Japan, USA) (En)
Space Harrier (Japan, USA) (En)
Please see the comment here: d8ba232#r138488462
Personally I would prefer the region for all of those ROM's to be set to USA instead of Japan... That may not be the case for everybody.
Not sure if this really qualifies as a bug... or a feature..
Logs and data
No response
See my comment here : #1637 (comment)
See my comment here : #1637 (comment)
I totally understand your perspective... I doubt anybody can write a perfect algorithm to handle any rom naming and honestly at this point what you have now with the hardregion detection etc. is near perfect from my perspective.
If you want to keep this issue open and assign it to me, I will try to submit a small PR in the near future... I just wanted to open an issue and get an understanding for how you feel about how it is now and any potential changes. or if i misunderstood or overlooked something...
I think as it is right now --> your algorithm will mostly handle NoIntro region/language naming conventions...
https://wiki.no-intro.org/index.php?title=Naming_Convention#Region
https://wiki.no-intro.org/index.php?title=Naming_Convention#Language(s)
It seems issues only arise when there are multiple regions specified.. and even then the current implementation is not strictly incorrect --> it just might not be the "preferred" hard region for any given user/setup.
I like the fact that your current implementation is more flexible than NoIntro naming conventions because it is nice to have Batocera still mostly work even if a strict naming convention is not adhered to (because others may use different naming conventions) -- I would just like it to also handle NoIntro naming conventions accurately when NoIntro naming is used.. It is almost there and I will try to look into in the next while...
I am new to Batocera.. and am super thankful for all the work you guys have put in, and continue to put into it.