Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artwork MIME type causing problems #38

Open
xquantxz opened this issue Feb 2, 2023 · 5 comments
Open

Artwork MIME type causing problems #38

xquantxz opened this issue Feb 2, 2023 · 5 comments

Comments

@xquantxz
Copy link

xquantxz commented Feb 2, 2023

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.

@hasecilu
Copy link

For example mpv can´t open the artwork. Do you know if there is another way to force the Picture MIME Type?

@xiaokang00010
Copy link

i have the same issue. file['artwork'].first.mime did not return the corresponding MIME type but None instead.

@JHubi1
Copy link

JHubi1 commented Mar 13, 2024

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.

@JHubi1
Copy link

JHubi1 commented Mar 13, 2024

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

@cyrildtm
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants