From 871ae2d5896e37af858116bccd964f3e17cf8a8d Mon Sep 17 00:00:00 2001 From: Uyanide Date: Fri, 3 Apr 2026 15:44:09 +0200 Subject: [PATCH] fix: confidence should not be 100 for irrelevant cases --- lrx_cli/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lrx_cli/models.py b/lrx_cli/models.py index 02721ac..0e7190a 100644 --- a/lrx_cli/models.py +++ b/lrx_cli/models.py @@ -63,3 +63,7 @@ class LyricResult: source: Optional[str] = None # Which fetcher produced this result ttl: Optional[int] = None # Hint for cache TTL (seconds) 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