mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
Merge pull request #379 from ritiek/comment-metadata
Embed comment metadata in .m4a
This commit is contained in:
@@ -31,6 +31,7 @@ M4A_TAG_PRESET = {
|
||||
"copyright": "cprt",
|
||||
"tempo": "tmpo",
|
||||
"lyrics": "\xa9lyr",
|
||||
"comment": "\xa9cmt",
|
||||
}
|
||||
|
||||
TAG_PRESET = {}
|
||||
|
||||
@@ -105,6 +105,7 @@ class EmbedMetadata:
|
||||
audiofile = MP4(music_file)
|
||||
self._embed_basic_metadata(audiofile, preset=M4A_TAG_PRESET)
|
||||
audiofile[M4A_TAG_PRESET["year"]] = meta_tags["year"]
|
||||
audiofile[M4A_TAG_PRESET["comment"]] = meta_tags["external_urls"]["spotify"]
|
||||
if meta_tags["lyrics"]:
|
||||
audiofile[M4A_TAG_PRESET["lyrics"]] = meta_tags["lyrics"]
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user