fix: duplicate game names during gb import

When importing a gamebase database with the option "All games - create gamelist views based on genre" duplicate game names where not imported correcly, some got imported twice and some where missing.
This commit is contained in:
lantzelot-swe 2023-10-19 21:44:25 +02:00
parent a534bf76a6
commit 23e325475a
2 changed files with 10 additions and 4 deletions

View File

@ -149,7 +149,7 @@ public class GamebaseImportWorker extends AbstractImportWorker
{
importManager.createGameViewForViewTag(this);
}
return importManager.clearAfterImport();
return importManager.importExecuted();
}
@Override

View File

@ -1043,12 +1043,18 @@ public class ImportManager
return size;
}
public int clearAfterImport()
public void clearAfterImport()
{
//Clear after import completed
gameFileNamesDuringImportMap.clear();
}
public int importExecuted()
{
//Clear for next iteration
int size = dbRowDataList.size();
dbRowDataList.clear();
gameInfoFilesMap.clear();
gameFileNamesDuringImportMap.clear();
gameInfoFilesMap.clear();
uiModel.cleanupAfterImport();
viewName = null;
viewTag = null;