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
#32
(05-12-2023, 06:33 PM)haeckse Wrote:
(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.

You may want to change it also in thumb-gen.php, then; that should do it for the thumbnails.
Reply
#33
There are 3 files that need to be updated with the code change.
https://github.com/moode-player/moode/co...e3de3a5366
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#34
(05-12-2023, 08:25 PM)Tim Curtis Wrote: There are 3 files that need to be updated with the code change.
https://github.com/moode-player/moode/co...e3de3a5366

@Tim Curtis
@Nutul
@TheOldPresbyope

That did the trick \o/

Thanks!

Cheers,
Andrea
Reply
#35
did the fix. worked well.
Reply
#36
further question. With the mentioned fix, Cover art for some folders is shown while playback, which failed before. But for this files there is no thumbnail in the playlist. how can I analyse this issue?
Reply
#37
(06-12-2023, 12:55 PM)zOr7gA8 Wrote: further question. With the mentioned fix, Cover art for some folders is shown while playback, which failed before. But for this files there is no thumbnail in the playlist. how can I analyse this issue?

If you install the latest 8.3.3 there is no need to play around with temporary fixes.
Give the newest version a chance:

1. Update to 8.3.3.
2. From Configure => Library, scroll down to "Thumbnail Generator" and do "Regenerate" album cover thumbnail cache.
3. From Configure => System => Local Display => Restart Local UI (this clears the browsers cache, ensuring the pictures are being downloaded anew.
Reply
#38
(06-12-2023, 08:34 PM)Nutul Wrote:
(06-12-2023, 12:55 PM)zOr7gA8 Wrote: further question. With the mentioned fix, Cover art for some folders is shown while playback, which failed before. But for this files there is no thumbnail in the playlist. how can I analyse this issue?

If you install the latest 8.3.3 there is no need to play around with temporary fixes.
Give the newest version a chance:

1. Update to 8.3.3.
2. From Configure => Library, scroll down to "Thumbnail Generator" and do "Regenerate" album cover thumbnail cache.
3. From Configure => System => Local Display => Restart Local UI (this clears the browsers cache, ensuring the pictures are being downloaded anew.

ok, with 8.3.3 it works now. thanks.
Reply


Forum Jump: