Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Cover images not loaded for all albums
#31
(05-11-2023, 07:10 PM)Nutul Wrote:
(05-11-2023, 12:06 PM)TheOldPresbyope Wrote: @haeckse
@Nutul 
@Tim Curtis 

What Tim said.

Sorry, I just noticed one last issue with the Show Me Something Good track you shared. Even after I converted to ID3 V2.3, removed the comments, and retyped the APIC frame as type 03 Cover (front) I was getting a thumbnail but not a full cover displayed during playback.

The track metadata is declaring the APIC format to be MIME type "image/PNG". I haven't had my coffee this morning so haven't browsed the code, but might we not be flattening upper- to lowercase when processing embedded images? Anyway, as a quick-n-dirty fix I edited the MIME type in the metadata to "image/png", and the cover now displays.

Regards,
Kent

Hi Kent,

had another look at the code, and:

- the Zend library looks at the APIC frame, doesn't seem to check for specific ImageType (although the image type IS read and stored in the APIC frame), so probably the first found image is used.

- the MIME type is returned as-is

- the thumbnail generator, to output the image, expects the MIME type to be all lowercase; so if the MIME is indeed "image/PNG", then it won't be matched, and no image is returned (even if it is there...), as we hit the default switch case, which just breaks' out.

Changing switch($mime) to switch(strtolower($mime)) in the code could help...

@Nutul @Tim Curtis @TheOldPresbyope 

I have changed the code in /var/www/cover.php as suggested to


PHP Code:
function outImage ($mime$data) {
 
       switch (strtolower ($mime) ) { 

but after a library update the same albums like before don't show thumbnails / large scale images.
Reply


Messages In This Thread
RE: Cover images not loaded for all albums - by haeckse - 05-12-2023, 06:33 PM

Forum Jump: