🐛 | 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
Some checks failed
SonarQube Code Quality Scan / SonarQube Scan (push) Failing after 1m20s
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user