Moode Forum
[SOLVED] Cover images not loaded for all albums - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [SOLVED] Cover images not loaded for all albums (/showthread.php?tid=5571)

Pages: 1 2 3 4


RE: Cover images not loaded for all albums - haeckse - 05-12-2023

(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.


RE: Cover images not loaded for all albums - Nutul - 05-12-2023

(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.


RE: Cover images not loaded for all albums - Tim Curtis - 05-12-2023

There are 3 files that need to be updated with the code change.
https://github.com/moode-player/moode/commit/3ad502f5f81c880fff5d1ffa120a4fe3de3a5366


RE: Cover images not loaded for all albums - haeckse - 05-13-2023

(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/commit/3ad502f5f81c880fff5d1ffa120a4fe3de3a5366

@Tim Curtis
@Nutul
@TheOldPresbyope

That did the trick \o/

Thanks!

Cheers,
Andrea


RE: Cover images not loaded for all albums - zOr7gA8 - 06-11-2023

did the fix. worked well.


RE: Cover images not loaded for all albums - zOr7gA8 - 06-12-2023

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?


RE: Cover images not loaded for all albums - Nutul - 06-12-2023

(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.


RE: Cover images not loaded for all albums - zOr7gA8 - 06-13-2023

(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.