forked from kenzuya/unshackle
feat(music): save lyrics beside the audio and keep song fields over remote
Song.lyrics_suffix writes the lyrics file; song fields set in get_tracks now reach a remote client.
This commit is contained in:
@@ -3867,6 +3867,11 @@ class dl:
|
||||
)
|
||||
if include_sample:
|
||||
self.write_sample(final_path, title, media_info)
|
||||
if isinstance(title, Song) and title.lyrics and title.lyrics_suffix:
|
||||
lyrics_path = final_path.with_suffix(title.lyrics_suffix)
|
||||
lyrics_path.write_text(f"{title.lyrics}\n", encoding="utf-8")
|
||||
sidecar_files.setdefault(muxed_path, []).append(lyrics_path)
|
||||
self.log.info(f"Saved lyrics to {lyrics_path.name}")
|
||||
|
||||
post_script_context = build_context(
|
||||
title,
|
||||
|
||||
Reference in New Issue
Block a user