Fix preview generation for mp3 files#39084
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
|
After this fix there is still an error with |
|
Although this is legacy code, I'm not too confident about removing IMO the best approach would be to adjust |
|
Thank you very much. I tried a few things with your code example and unfortunately run into an error. @JammingBen Do you have an Idea about this? |
|
What you see directly after uploading is the plain SVG image, therefore it looks super sharp. Shortly after, the preview manager detects that this is a mp3 file which could have a thumbnail. This is where your code comes into play and renders a "no cover thumbnail" based on the SVG file. However, for me the icon doesn't look pixelated. Do you use |
|
Kudos, SonarCloud Quality Gate passed! |
|
💥 Acceptance tests pipeline apiWebdavMove1-mariadb10.2-php7.4 failed. The build has been cancelled. |
|
Okay that is weird. Differences in PHP and/or imagick versions on both of these servers? Note that this is also not an optimal solution. The best approach would be to ignore the thumbnail creation for mp3s without cover and use the svg image instead. Unfortunately, the current architecture does not allow that easily. It just divides into "needs thumbnail" and "doesn't need thumbnail". There is no category for "may need a thumbnail based in meta data". |
|
Is there a way to prevent overwriting the icon when there is no preview. Even if getThumbnail returns false, the icon is changed for me. |











Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: