sam-ludlow / mame-ao

Run MAME easily, automatic download and setup for binaries and ROMs from archive.org
MIT License
91 stars 13 forks source link

Genres not showing machines correctly #39

Closed sam-ludlow closed 4 months ago

sam-ludlow commented 4 months ago

I noticed when browsing through Genres it wasn't showing all the machines.

The fix is delete _machine.sqlite from inside the MAME version directory and let it get recreated.

Root cause I'm not that sure. MAME-AO will update the DB with new genre data when catver.ini gets a version bump.

I'm guessing the file changed on GitHub without a version bump?

The in-memory genre data is parsed each time MAME-AO starts and the DB only on the version bump. As parsing creates internal IDs they may have become out of sync with the IDs in the DB.

Not sure will have to look into it.

sam-ludlow commented 4 months ago

Pretty sure it was that

https://github.com/AntoPISA/MAME_SupportFiles/commit/0c9f81e1dc82c3faedc6623237f8a3b434761658

Bunch of changes here and the top comment that MAME-AO parses the version from did not change.

I changed the metadata caching to download fresh if its over 3 hours old (not on version bumps).

So the genre data was downloaded and the DB updated, then later genre data changed on GitHub the cache refreshed it as its the same version the DB was left alone BUT each time MAME-AO starts it parses the file again creating internal IDs. Oh dear now these don't match the DB.

I should look at that.

sam-ludlow commented 4 months ago

Use a hash of the file rather then the version, dummy.

paulmortlock commented 4 months ago

Very interesting can you show an example of what was missing please.

sam-ludlow commented 4 months ago

It was a shambles, fixed in 1.90

paulmortlock commented 4 months ago

I extracted to my current mam-ao and get this initially.

image

paulmortlock commented 4 months ago

image

sam-ludlow commented 4 months ago

Hmm we got another issue for this please talk about it there.

sam-ludlow commented 4 months ago

Closing ticket Genre bug looks fixed.