From 52bf2bad0102404eedd1f802f2dc17164cf5844f Mon Sep 17 00:00:00 2001 From: Nichlas Severinsen Date: Wed, 30 Jun 2021 08:38:00 +0200 Subject: [PATCH] Make identification query more advanced for edgecases --- libray/iso.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libray/iso.py b/libray/iso.py index 369edbf..bef83bb 100644 --- a/libray/iso.py +++ b/libray/iso.py @@ -200,12 +200,12 @@ class ISO: if not redump: - core.vprint('Trying to find redump key based on size and game title', args) + core.vprint('Trying to find redump key based on size, game title, and country', args) if not game_title: raise ValueError - keys = c.execute('SELECT * FROM games WHERE lower(name) LIKE ? AND size = ?', ['%' + game_title.lower() + '%', str(self.size)]).fetchall() + keys = c.execute('SELECT * FROM games WHERE lower(name) LIKE ? AND size = ?', ['%' + '%'.join(game_title.lower().split(' ')) + '%' + core.serial_country(self.game_id).lower() + '%', str(self.size)]).fetchall() if keys: