Fix generate and import code for other DAT types

This commit is contained in:
Matt Nadareski
2016-03-18 15:01:00 -07:00
parent 5ddfec5360
commit 22d50e3162
2 changed files with 152 additions and 151 deletions

View File

@@ -103,6 +103,12 @@ namespace DATabase
// Retrieve the list of processed roms
List<RomData> roms = ProcessRoms();
// If the output is null, nothing was found so return false
if (roms == null)
{
return false;
}
// Create a name for the file based on the retrieved information
string version = DateTime.Now.ToString("yyyyMMddHHmmss");
string datname = systemname + " (" + sourcename + " " + version + ")";
@@ -234,7 +240,7 @@ JOIN checksums
(!srcmerged ? " sources.id=" + _source : "") +
(!srcmerged && !sysmerged ? " AND" : "") +
(!sysmerged ? " systems.id=" + _system : "") +
(merged ? " GROUP BY checksums.size, checksums.crc, checksums.md5, checksums.sha1" : "") +
(merged ? "\nGROUP BY checksums.size, checksums.crc, checksums.md5, checksums.sha1" : "") +
"\nORDER BY systems.id, sources.id, games.name, files.name";
using (SQLiteConnection dbc = new SQLiteConnection(_connectionString))
{