test: add basic tests for cache-search & network fetchers

test: enable debug
test: add pytest.ini to mark tests that require network
fix: cache-search should not aquire full match of artists due to different translations
fix: replace dynamic f-string SQL in track WHERE clauses with parameterized nullable conditions
refactor: lrc.py should never directly call print, return a str instead
chore: add requirements.txt (via 'uv export')
chore: update README.md with dev instructions
This commit is contained in:
2026-04-05 09:42:42 +02:00
parent 84a3e1076e
commit 0d56cde927
12 changed files with 360 additions and 70 deletions
+5 -6
View File
@@ -271,18 +271,17 @@ class LRCData:
return "\n".join(sorted_lines).strip()
def print_lyrics(
def to_lrc(
self,
plain: bool = False,
) -> None:
"""Print lyrics, optionally stripping tags.
) -> str:
"""Return lyrics, optionally stripping tags.
Assumes text has been normalized by normalize.
"""
if plain:
print(self.to_plain())
else:
print("\n".join(self._lines))
return self.to_plain()
return "\n".join(self._lines)
def get_audio_path(audio_url: str, ensure_exists: bool = False) -> Optional[Path]: