fix: suppress log entries for items in the import folder that already exist in the database
This commit is contained in:
@@ -46,7 +46,7 @@ namespace gaseous_server.Classes
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logging.Log(Logging.LogType.Information, "Import Game", "Processing item " + GameFileImportPath);
|
//Logging.Log(Logging.LogType.Information, "Import Game", "Processing item " + GameFileImportPath);
|
||||||
if (IsDirectory == false)
|
if (IsDirectory == false)
|
||||||
{
|
{
|
||||||
FileInfo fi = new FileInfo(GameFileImportPath);
|
FileInfo fi = new FileInfo(GameFileImportPath);
|
||||||
@@ -58,9 +58,12 @@ namespace gaseous_server.Classes
|
|||||||
dbDict.Add("sha1", hash.sha1hash);
|
dbDict.Add("sha1", hash.sha1hash);
|
||||||
DataTable importDB = db.ExecuteCMD(sql, dbDict);
|
DataTable importDB = db.ExecuteCMD(sql, dbDict);
|
||||||
if ((Int64)importDB.Rows[0]["count"] > 0)
|
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");
|
Logging.Log(Logging.LogType.Information, "Import Game", " " + GameFileImportPath + " already in database - skipping");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logging.Log(Logging.LogType.Information, "Import Game", " " + GameFileImportPath + " not in database - processing");
|
Logging.Log(Logging.LogType.Information, "Import Game", " " + GameFileImportPath + " not in database - processing");
|
||||||
|
Reference in New Issue
Block a user