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",
|
"copyright": "cprt",
|
||||||
"tempo": "tmpo",
|
"tempo": "tmpo",
|
||||||
"lyrics": "\xa9lyr",
|
"lyrics": "\xa9lyr",
|
||||||
|
"comment": "\xa9cmt",
|
||||||
}
|
}
|
||||||
|
|
||||||
TAG_PRESET = {}
|
TAG_PRESET = {}
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ class EmbedMetadata:
|
|||||||
audiofile = MP4(music_file)
|
audiofile = MP4(music_file)
|
||||||
self._embed_basic_metadata(audiofile, preset=M4A_TAG_PRESET)
|
self._embed_basic_metadata(audiofile, preset=M4A_TAG_PRESET)
|
||||||
audiofile[M4A_TAG_PRESET["year"]] = meta_tags["year"]
|
audiofile[M4A_TAG_PRESET["year"]] = meta_tags["year"]
|
||||||
|
audiofile[M4A_TAG_PRESET["comment"]] = meta_tags["external_urls"]["spotify"]
|
||||||
if meta_tags["lyrics"]:
|
if meta_tags["lyrics"]:
|
||||||
audiofile[M4A_TAG_PRESET["lyrics"]] = meta_tags["lyrics"]
|
audiofile[M4A_TAG_PRESET["lyrics"]] = meta_tags["lyrics"]
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user