change confidence to %
This commit is contained in:
@@ -29,7 +29,7 @@ class Cache:
|
||||
self.sqlite_exts: list[str] = ['/usr/local/lib/python3.11/dist-packages/spellfix1.cpython-311-x86_64-linux-gnu.so']
|
||||
self.label: str = "Cache"
|
||||
|
||||
def get_matched(self, sqlite_rows: list[sqlite3.Row], matched_candidate: tuple, confidence: float) -> Optional[LyricsResult]:
|
||||
def get_matched(self, sqlite_rows: list[sqlite3.Row], matched_candidate: tuple, confidence: int) -> Optional[LyricsResult]:
|
||||
"""Get Matched Result"""
|
||||
matched_id: int = matched_candidate[0]
|
||||
for row in sqlite_rows:
|
||||
@@ -148,7 +148,7 @@ class Cache:
|
||||
best_match: tuple|None = matcher.find_best_match(input_track=input_track,
|
||||
candidate_tracks=result_tracks)
|
||||
else:
|
||||
best_match = (result_tracks[0], float(1))
|
||||
best_match = (result_tracks[0], 100)
|
||||
if not best_match:
|
||||
return None
|
||||
(candidate, confidence) = best_match
|
||||
|
Reference in New Issue
Block a user