🐛 | Fix prefetch bug (str vs int), move json import to module level, add missing type hints
Some checks failed
SonarQube Code Quality Scan / SonarQube Scan (push) Failing after 1m20s

This commit is contained in:
2026-06-04 16:22:29 +03:00
parent d8ebd6186c
commit 7e9f78ce88
3 changed files with 10 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
"""SQLite-backed database for song history, favourites, and play stats."""
import json
import sqlite3
import threading
from datetime import datetime, timezone
@@ -87,7 +88,6 @@ class MusicDB:
duration: int = 0,
thumbnail: Optional[str] = None) -> None:
"""Record that a song was played (upsert + history row)."""
import json
artists_json = json.dumps(artists, ensure_ascii=False)
album_json = json.dumps(album) if album else None
with self._lock: