j68k / verifydump

A tool for verifying that .chd/.rvz disc images match Redump Datfiles
MIT License
51 stars 7 forks source link

Add argument to print list of games present in the datfile that were not successfully verified #17

Closed Z-95 closed 2 years ago

Z-95 commented 2 years ago

The tool already notifies about things like wrong names and files that do not match, but I wanted to also know about games that exist in the datfile but were not successfully verified (either due to verification errors or just not being present).

This would let full set collectors just drop in a new datfile and see any new missing games since you can't really use the datfiles in something like clrmamepro to verify against chd files.

I've already coded this locally for my own usage but wanted to offer it up if anyone else would find it useful.

Inside verifydump_main in console.py I added a new optional argument:

arg_parser.add_argument("--report-unverified", action=argparse.BooleanOptionalAction, default=False, help="Reports games that are present in the Datfile but were not successfully verified.")

and after print(f"Successfully verified {len(verified_games)} dumps") I added:

        if args.report_unverified:
            if len(verified_games) < len(dat.games):
                unverified_games = list(set(dat.games) - set(verified_games))
                unverified_games.sort(key=lambda x: x.name)
                print(f"{len(unverified_games)} game(s) present in the Datfile but not successfully verified:")
                for unverified_game in unverified_games:
                    print(f'"{unverified_game.name}"')

Sample output:

Datfile loaded successfully with 21 games Dump .bin files verified correct and complete, and .cue essential structure matches: "Ants (USA) (Unl)" Dump .bin files verified correct and complete, and .cue essential structure matches: "Fast Food 64 (USA) (Unl)" Dump .bin files verified correct and complete, and .cue essential structure matches: "Fast Food 64 - Holiday Snacks (USA) (Unl)" Dump .bin files verified correct and complete, and .cue essential structure matches: "Frogz 64 (USA) (Unl)" Dump .bin files verified correct and complete, and .cue essential structure matches: "Saucer Wars (USA) (Unl)" Successfully verified 5 dumps 16 games are present in the Datfile but were not successfully verified: "Baldies (USA) (Rev 1)" "Battle Morph (USA)" "Blue Lightning (USA)" "BrainDead 13 (USA)" "Frog Feast (USA) (Unl)" "Highlander - The Last of the MacLeods (USA)" "Hover Strike - Unconquered Lands (USA)" "Iron Soldier 2 (USA) (Songbird Limited Edition)" "Myst (USA)" "Myst (USA) (Demo)" "Myst (USA) (Demo) (Alt)" "Primal Rage (USA)" "Robinson's Requiem (USA) (Unl)" "Space Ace (USA)" "Vid Grid (USA)" "World Tour Racing (USA) (Songbird)"

j68k commented 2 years ago

That looks great! I'll add it next time I do an update. If you'd like to submit a pull request for this so that you get the credit in the Git history then please feel free, but it's also fine if you'd rather not. Thanks again!

coreyemtp commented 2 years ago

I like it! Us hoar... I mean collectors can never have too much info! I really wish Roman would add RVZ support and CHD support for more systems to clrmamepro.

j68k commented 2 years ago

PR looks great, and has been merged. Thanks again @Z-95!