fix: confidence should not be 100 for irrelevant cases

This commit is contained in:
2026-04-03 15:44:09 +02:00
parent c44797fbf9
commit 871ae2d589
+4
View File
@@ -63,3 +63,7 @@ class LyricResult:
source: Optional[str] = None # Which fetcher produced this result source: Optional[str] = None # Which fetcher produced this result
ttl: Optional[int] = None # Hint for cache TTL (seconds) ttl: Optional[int] = None # Hint for cache TTL (seconds)
confidence: float = 100.0 # 0-100 selection confidence (100 = trusted/exact) confidence: float = 100.0 # 0-100 selection confidence (100 = trusted/exact)
def __post_init__(self) -> None:
if self.status in (CacheStatus.NOT_FOUND, CacheStatus.NETWORK_ERROR):
self.confidence = 0.0