Closed Retro-R closed 1 year ago
Not enough information to understand the issue.
I have the same question. I did the following:
tags = music_tag.load_file(media_path)
with open('artwork.jpg', 'rb') as img:
tags["artwork"] = img.read()
tags.save()
Here is OneDrive link to the file: https://1drv.ms/u/s!Aq1PMiDnHe9tk5Ygn_JVNQ3vMPjNjQ?e=3yBrB2
macOS Finder:
Mp3Tag (macOS app):
iTunes Library (Apple Music):
Clearly there is a compatibility issue. I have 40GB of media files that I want to sync to my Apple devices, all of them missing the artwork which is important. Any help is appreciated!
Finally a solution: Just make sure Pillow is installed before setting the artwork tag! I discovered this by chance when I was trying to set the thumbnail and I knew from the docs that thumbnails require Pillow. While tagging around 1200 files, 3 of them crashed with the below error when setting the artwork itself, before the thumbnail, so I knew something is being done differently! Now they all show in iTunes.
The error:
File ".venv/lib/python3.11/site-packages/music_tag/file.py", line 187, in __init__
depth = mode2depth[img.mode]
~~~~~~~~~~^^^^^^^^^^
KeyError: 'LA'
Apparently some JPEG files have an unsupported mode, but that's another issue.
Created issue #44.
I'm using a mac, and i've saved my artwork from url. It shows up fine in like the finder folder, as in it shows the artwork in the preview but when i open it in iTunes the artwork doesn't display. idk if this is something wrong w iTunes or something but i was just curious if anyone else had this issue and how they solved it.