fix: Handle games title ending with a year (e.g. 97) better when generating file names.

This commit is contained in:
lantzelot-swe 2022-04-04 11:52:12 +02:00
parent 9122dbc692
commit 38913ca19a
1 changed files with 2 additions and 1 deletions

View File

@ -888,7 +888,8 @@ public class DbConnector
sqlBuilder.append(fileName);
sqlBuilder.append("-cover*\' OR CoverFile GLOB \'");
sqlBuilder.append(fileName);
sqlBuilder.append("[0-9][0-9]-cover*\';");
//Use only 0-5 here to filter out games where title may end with a year, e.g 97. 59 duplicates should be enough...
sqlBuilder.append("[0-5][0-9]-cover*\';");
String sql = sqlBuilder.toString();
logger.debug("Checking if game is in db already: {}", sql);
int returnIndex = 0;