radio_util: open tracks SQLite DB in readonly mode; black: reformat files

This commit is contained in:
2025-04-17 07:28:05 -04:00
parent 96add377df
commit 6c88c23a4d
25 changed files with 1913 additions and 1340 deletions

View File

@ -1,6 +1,7 @@
from dataclasses import dataclass
from typing import Union
@dataclass
class LyricsResult:
"""
@ -12,31 +13,37 @@ class LyricsResult:
lyrics (Union[str, list]): str if plain lyrics, list for lrc
time (float): time taken to retrieve lyrics from source
"""
artist: str
song: str
src: str
lyrics: Union[str, list]
confidence: int
time: float = 0.00
"""
Generic
"""
class InvalidLyricSearchResponseException(Exception):
pass
"""
Genius
"""
class InvalidGeniusResponseException(
InvalidLyricSearchResponseException):
class InvalidGeniusResponseException(InvalidLyricSearchResponseException):
pass
"""
LRCLib
"""
class InvalidLRCLibResponseException(
InvalidLyricSearchResponseException):
pass
class InvalidLRCLibResponseException(InvalidLyricSearchResponseException):
pass