fix: suppress log entries for items in the import folder that already exist in the database

This commit is contained in:
Michael Green
2023-05-05 09:53:36 +10:00
parent e68f6003ba
commit 520380243d

View File

@@ -46,7 +46,7 @@ namespace gaseous_server.Classes
}
else
{
Logging.Log(Logging.LogType.Information, "Import Game", "Processing item " + GameFileImportPath);
//Logging.Log(Logging.LogType.Information, "Import Game", "Processing item " + GameFileImportPath);
if (IsDirectory == false)
{
FileInfo fi = new FileInfo(GameFileImportPath);
@@ -58,9 +58,12 @@ namespace gaseous_server.Classes
dbDict.Add("sha1", hash.sha1hash);
DataTable importDB = db.ExecuteCMD(sql, dbDict);
if ((Int64)importDB.Rows[0]["count"] > 0)
{
if (!GameFileImportPath.StartsWith(Config.LibraryConfiguration.LibraryImportDirectory))
{
Logging.Log(Logging.LogType.Information, "Import Game", " " + GameFileImportPath + " already in database - skipping");
}
}
else
{
Logging.Log(Logging.LogType.Information, "Import Game", " " + GameFileImportPath + " not in database - processing");