Added album lyrics download to .lrc file (#241)

* adding flag for download lyrics

* adding sum debug info

* adding configuration part

* Update config.example.toml

* refactor: move lyrics to utility and apply code review feedback

* refactor: optimize lyrics download and apply code review feedback

- Pass album_items directly to lyrics function to avoid redundant API calls
- Remove unused Path import from api.py
- Remove duplicate debug logging already covered elsewhere
- Use last_album_items reference instead of fetching data again
- Move lyrics download logic to separate utility function in core.utils.lyrics
- Keep lyrics configuration only in docs/config.example.toml without modifying other settings

This optimization reduces API calls by reusing already fetched album items data instead of making new requests for lyrics download.
This commit is contained in:
Daniele Russo
2025-11-24 19:25:13 +01:00
committed by GitHub
parent b9f586574a
commit f2ee4f8fad
6 changed files with 139 additions and 2 deletions
+6
View File
@@ -95,6 +95,12 @@ cover = false
# only works when downloading album
album_review = false
[lyrics]
#please don't confuse de metadata lyrics with .lrc file that is a stand alone file
save = true # dowload file .lrc
[lyrics.templates]
album = "{item.number:02d} - {item.title}"
[cover]
# please don't confuse the cover from metadata with cover as a distinct file.