From 653ee7c3a1290fcfb9212e512b4418e5c42d8328 Mon Sep 17 00:00:00 2001 From: tavo-wasd Date: Sun, 31 Mar 2024 11:44:05 -0600 Subject: [PATCH] better for fuzzy finder --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 4910fa5..bf9e985 100644 --- a/main.py +++ b/main.py @@ -22,7 +22,7 @@ def find_song(query, songs_dir): song_path = os.path.join(root, file) #song_name = os.path.relpath(song_path, start=songs_dir) song_name = os.path.splitext(file)[0] - confidence = process.extractOne(query, [song_name])[1] + confidence = process.extractOne(query, [song_name.replace("_", " ")])[1] if confidence > best_confidence: best_match = song_path