Skip to content

Commit 1fcfe01

Browse files
authored
Tune Lutro scan not to add hits if some other DB was given for the scan (#18953)
1 parent b2d7c38 commit 1fcfe01

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tasks/task_database.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ static enum scan_verdict task_database_iterate_crc_lookup(
12331233
return SCAN_VERDICT_NO_DB_MATCH;
12341234
}
12351235

1236-
/* There is no Lutro database, but all .lutro files will be recognized. */
1236+
/* There is a Lutro database, but without crc/serial, so all .lutro files will be recognized. */
12371237
static int task_database_iterate_playlist_lutro(
12381238
manual_scan_handle_t *_db,
12391239
database_state_handle_t *db_state,
@@ -1244,6 +1244,13 @@ static int task_database_iterate_playlist_lutro(
12441244
fill_pathname(game_title,
12451245
path_basename(path), "", sizeof(game_title));
12461246

1247+
/* Skip if strict scan was asked with specific database */
1248+
if ( _db->task_config->db_usage == MANUAL_CONTENT_SCAN_USE_DB_STRICT &&
1249+
_db->task_config->database_name &&
1250+
*_db->task_config->database_name &&
1251+
memcmp(_db->task_config->database_name, "Lutro", 6) != 0 )
1252+
return SCAN_VERDICT_NO_DB_MATCH;
1253+
12471254
scan_results_add(&_db->scan_results,
12481255
path,
12491256
game_title,

0 commit comments

Comments
 (0)