mirror of
https://github.com/SabreTools/wizzardRedux.git
synced 2026-09-23 23:34:13 +00:00
Possibly fix erroneous merging
This is another backport from the desktop version which is somewhat based on feedback from nombre002/@tractivo. In another turn of coincidence so far, all WoD custom DATs (the testing ground for most of the app) all have CRC, MD5, and SHA1. This is not the case for all sets; some have only CRC and MD5 or CRC and SHA1 (or even just CRC). With the original code, these duplicates would be left in because they didn't match in every single aspect. This is a tenative fix that may have further fixes that are coordinated with the desktop version in the future.
This commit is contained in:
@@ -598,6 +598,17 @@ function process_roms($systems, $sources)
|
||||
($sources != "" ? " sources.id IN (".$sources.")" : "").
|
||||
($sources != "" && $systems != "" ? " AND" : "").
|
||||
($systems != "" ? " systems.id IN (".$systems.")" : "").
|
||||
($systems == "" && $sources == "" ? "\nWHERE" : " AND") +
|
||||
"\n files.id IN ( SELECT checksums.file FROM checksums JOIN files ON checksums.file=files.id WHERE files.type='rom'" +
|
||||
(merged ? "\nGROUP BY checksums.size, checksums.crc" : "") + " )" +
|
||||
"\n OR files.id IN ( SELECT checksums.file FROM checksums JOIN files ON checksums.file=files.id WHERE files.type='rom'" +
|
||||
(merged ? "\nGROUP BY checksums.size, checksums.md5" : "") + " )" +
|
||||
"\n OR files.id IN ( SELECT checksums.file FROM checksums JOIN files ON checksums.file=files.id WHERE files.type='rom'" +
|
||||
(merged ? "\nGROUP BY checksums.size, checksums.sha1" : "") + " )" +
|
||||
"\n OR files.id IN ( SELECT checksums.file FROM checksums JOIN files ON checksums.file=files.id WHERE files.type='disk'" +
|
||||
(merged ? "\nGROUP BY checksums.md5" : "") + " )" +
|
||||
"\n OR files.id IN ( SELECT checksums.file FROM checksums JOIN files ON checksums.file=files.id WHERE files.type='disk'" +
|
||||
(merged ? "\nGROUP BY checksums.sha1" : "") + " )" +
|
||||
($merged ? " GROUP BY checksums.size, checksums.crc, checksums.md5, checksums.sha1" : "").
|
||||
" ORDER BY systems.id, sources.id, games.name, files.name";
|
||||
$result = mysqli_query($link, $query);
|
||||
|
||||
Reference in New Issue
Block a user