alucryd / oxyromon

Rusty ROM OrgaNizer
Other
110 stars 13 forks source link

fails to import No-Intro Love Packs #113

Closed bdeshi closed 4 months ago

bdeshi commented 5 months ago

~Oxymoron~ 🤦‍♂️ Oxyromon fails to import some dats from the default No-Intro Love Pack (Standard) archive.

Source dats:

Source dats:


Some of these may not be practical, but I think importing the no-intro archives as-is would be a good user experience.

alucryd commented 5 months ago

Thanks, I'll take a look. The former are probably just empty, and the latter are a bit trickier as I need both size and checksum to match files. At the very least adding a default array for games should do the trick, as for size, not sure how to set a default if the field is there and empty but it shouldn't be too hard.

maxexcloo commented 4 months ago

Adding to this, I get a hang on the "Nintendo - Nintendo DSi (Digital) (CDN) (Encrypted) (Parent-Clone) (20230417-043358).dat" DAT:

Processing "Nintendo - Nintendo DSi (Digital) (CDN) (Encrypted) (Parent-Clone) (20230417-043358).dat"
System: Nintendo - Nintendo DSi (Digital) (CDN) (Encrypted) (Parent-Clone)
Version: 20230417-043358
Games: 804
Processing system
Deleting old games
Processing games
maxexcloo commented 4 months ago

Another one that fails to import is the MAME DAT DATs/ROMs_(machine+bios+device)/MAME_ROMs_262.dat from https://www.progettosnaps.net//dats/MAME/packs/MAME_Dats_262.7z

Processing "MAME_ROMs_262.dat"
System: MAME - ROMs
Version: 0.262
Games: 41120
Processing system
Deleting old games
Processing games
⠤                                                                                                               40009/41120 22.5544/s 00:06:07 (00:00:49) [#############################################################################---]
thread 'main' panicked at src/import_dats.rs:469:49:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
alucryd commented 4 months ago

Taken care of in https://github.com/alucryd/oxyromon/commit/9e2eefec55874beb379dc5ae75a52d0c3d9f1aa4.

@bdeshi I was able to import the whole love pack with this, roms with no size will simply be ignored (and a warning printed in the console).

@maxexcloo Also took care of the MAME dat, it looks a bit odd but I may not fully grasp it yet. I thought romof without a cloneof was used to signify a dependency to a bios, but here there are romof referring to non bios games (granted they are devices, and I added that info to the database in case it comes in handy in the future). Also the DAT has a few bogus entries, roms that are marked as merge are supposed to be present in either the parent game or the bios, but there are quite a few here that aren't, you'll see some warnings for them.

As for the hang, it happens sometimes here as well, I think it's just the sqlite database choking when there's a lot of activity, mostly during import-dats as it's quite database heavy. It's rare enough and unblocks itself after a few seconds though.