music-tag
music-tag copied to clipboard
Artwork MIME type causing problems
In a some cases, when adding cover art to file, the type doesn't get recognized and the mime is set to type/None. This causes some problems when working with audio file readers that rely on this to show the artwork.
Maybe it would be better if it could raise an exception so that users can know whats wrong at least.
For example mpv
can´t open the artwork. Do you know if there is another way to force the Picture MIME Type
?
i have the same issue. file['artwork'].first.mime did not return the corresponding MIME type but None
instead.
I have the exact same issue, I use music-tag for a python script in which I download an artwork as JPG and then add it. It worked previously, but I lost my old installation and seemingly something broke that. Now, my audio artworks are not working in my Jellyfin instance.
After trying a bit around, I now know what the problem is: pillow
has to be installed. It's not telling you that or something, just figured it out by accident. And I don't mean that you have to do anything, just pip install pillow
and it works again
After trying a bit around, I now know what the problem is:
pillow
has to be installed. It's not telling you that or something, just figured it out by accident. And I don't mean that you have to do anything, justpip install pillow
and it works again
Same here with the following error without pillow:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\ycui\miniconda3\Lib\site-packages\music_tag\file.py", line 603, in __setitem__
self.set(norm_key, val)
File "C:\Users\ycui\miniconda3\Lib\site-packages\music_tag\file.py", line 503, in set
tmap.setter(self, norm_key, val)
File "C:\Users\ycui\miniconda3\Lib\site-packages\music_tag\mp4.py", line 99, in set_artwork
raise TypeError('mp4 artwork should be either jpeg or png')
TypeError: mp4 artwork should be either jpeg or png