Bug 418800

Summary: Elisa does not show cover art for files with embedded album art
Product: [Applications] Elisa Reporter: SolidTemperature0 <i6icgp6>
Component: generalAssignee: Matthieu Gallien <matthieu_gallien>
Status: REOPENED ---    
Severity: normal CC: amateuracademic616, aronkvh, colin.tinker, espidev, flying-sheep, flyingwaffle, indecisiveautomator, knut.hildebrandt, maty78485, mitoyow169, nate, nav_dx, nwestervelt, openmail+kde, postix, trmdi, weibledh, xll520yzl
Priority: VHI    
Version: 21.12.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 22.08

Description SolidTemperature0 2020-03-13 08:13:04 UTC
SUMMARY
In my installation Elisa seems not be able to show the cover arts of some correctly tagged album (the covers are present and correctly shown by: iTunes on Windows, Dolphin on Linux and VLC on both).
The album arts that are not shown are always the same every time I start Elisa. If I close Elisa, manually delete the its db, restart it and let it do a new scan of my library folder the bug reappears on the same albums.
I could not found any sort of pattern in the affected albums: not every album have a symbol in its name/path/tags (as in this bug https://bugs.kde.org/show_bug.cgi?id=417409), the format of the files was different (it affects both mp3 and m4a), albums of the same artist seems to be more probably affected together, but it does not happen every time (it happens that some albums of one artist are affected and other no).


STEPS TO REPRODUCE
1. Open Elisa
2. (If the first boot wait for the scan to end)

OBSERVED RESULT
Some albums are not shown with their cover art (but with the default one).

EXPECTED RESULT
All the correctly tagged files should be shown with their album art.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro (Stable, up-to-date on 2020/3/13) (Kernel 5.5.7)
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION
Comment 1 SolidTemperature0 2020-03-15 09:09:28 UTC
The bug is still present in Elisa 19.12.3 (always the same albums are affected, I also tried to delete Elisa's db to re-import all the songs)
Also the rest of the system has been updated, here the updated information:
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro (Stable, up-to-date on 2020/3/15) (Kernel 5.5.8)
(available in About System)
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1
Comment 2 Matthieu Gallien 2020-03-22 22:42:44 UTC
Thanks for your report.

I will see if I can find the issue but most probably will have to add some logging capabilities to help diagnose that.

Are you able to compile an Elisa patched version if needed ?

In the meantime, I will have a look at the code to see if I can get some ideas on how to fix that.
Comment 3 SolidTemperature0 2020-03-23 15:48:44 UTC
(In reply to Matthieu Gallien from comment #2)
> Thanks for your report.
> 
> I will see if I can find the issue but most probably will have to add some
> logging capabilities to help diagnose that.
> 
> Are you able to compile an Elisa patched version if needed ?
> 
> In the meantime, I will have a look at the code to see if I can get some
> ideas on how to fix that.

I will happily build Elisa with any provided patch, test it and report here the log.
My only concern is that, using Manjaro, I maybe not have available the latest version of KDE Frameworks, but I don't know if/how much this could be a problem.
Comment 4 Matthieu Gallien 2020-03-23 20:35:04 UTC
(In reply to SolidTemperature0 from comment #3)
> (In reply to Matthieu Gallien from comment #2)
> > Thanks for your report.
> > 
> > I will see if I can find the issue but most probably will have to add some
> > logging capabilities to help diagnose that.
> > 
> > Are you able to compile an Elisa patched version if needed ?
> > 
> > In the meantime, I will have a look at the code to see if I can get some
> > ideas on how to fix that.
> 
> I will happily build Elisa with any provided patch, test it and report here
> the log.
> My only concern is that, using Manjaro, I maybe not have available the
> latest version of KDE Frameworks, but I don't know if/how much this could be
> a problem.

Thanks for the help offer.

Do you know which version you have ?
Comment 5 SolidTemperature0 2020-03-23 20:51:30 UTC
(In reply to SolidTemperature0 from comment #1)
> The bug is still present in Elisa 19.12.3 (always the same albums are
> affected, I also tried to delete Elisa's db to re-import all the songs)
> Also the rest of the system has been updated, here the updated information:
> SOFTWARE/OS VERSIONS
> Linux/KDE Plasma: Manjaro (Stable, up-to-date on 2020/3/15) (Kernel 5.5.8)
> (available in About System)
> KDE Plasma Version: 5.18.3
> KDE Frameworks Version: 5.67.0
> Qt Version: 5.14.1

Right know this is still my setup
Comment 6 SolidTemperature0 2020-03-24 11:34:39 UTC
I have updated my system and the bug is still present (always the same albums are affected, I also tried to delete Elisa's db to re-import all the songs, but nothing changed)
Here the updated information about my system:
SOFTWARE/OS VERSIONS
Elisa: 19.12.3
Linux/KDE Plasma: Manjaro (Stable, up-to-date on 2020/3/24) (Kernel 5.5.11)
(available in About System)
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.68.0
Qt Version: 5.14.1
Comment 7 Matthieu Gallien 2020-03-28 20:09:11 UTC
Thanks for the info.

I will see if I need more data and will keep you informed.
Comment 8 Matthieu Gallien 2020-03-31 20:36:49 UTC
I forgot to ask if the covers are files alongside the music files or embedded as tags inside the music files ?
Comment 9 SolidTemperature0 2020-04-01 11:08:33 UTC
(In reply to Matthieu Gallien from comment #8)
> I forgot to ask if the covers are files alongside the music files or
> embedded as tags inside the music files ?

In my library are present various album that have, in the same folder as the actual song files, some "Folder.jpg" or "AlbumArtSmall.jpg" files that are a copy of the cover art, but still ALL the music files in my library are tagged with the album cover art also if these files are present.
In the case of the albums that are affected by this bug, NONE of them have a separate cover art image in their folder: they just use the embedded tag.
Please note that there are other albums that does not have any "Folder.jpg" or "AlbumArtSmall.jpg" and just rely on the embedded tag, but their cover arts are shown correctly.
Comment 10 SolidTemperature0 2020-04-26 10:09:03 UTC
Bug still present with Elisa 20.04 (as usual I also tried to deleting Elisa's db to re-import all the tracks).
Here the updated information about my system:
SOFTWARE/OS VERSIONS
Elisa: 20.04.0
Linux/KDE Plasma: Manjaro (Stable, up-to-date on 2020/4/26) (Kernel 5.6.7)
(available in About System)
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2
Comment 11 FlyingWaffle 2020-08-08 20:15:20 UTC
I had encountered the same issue on my Gentoo machine just recently and I think I've figured out what is going on.  When I checked my tags using Kid3 I realized that all of my albums that were not showing artwork had the cover art tagged as "Picture" (with 'other' on the dropdown).  After editing the tags on all the affected albums to "Picture: Cover (front)", refreshing my collection, and restarting Elisa everything works as expected and all my album art shows up!

So Elisa seems to look for album art specifically tagged as "Picture: Cover (front)" and ignores everything else.
Comment 12 SolidTemperature0 2020-08-12 08:36:40 UTC
(In reply to FlyingWaffle from comment #11)
> I had encountered the same issue on my Gentoo machine just recently and I
> think I've figured out what is going on.  When I checked my tags using Kid3
> I realized that all of my albums that were not showing artwork had the cover
> art tagged as "Picture" (with 'other' on the dropdown).  After editing the
> tags on all the affected albums to "Picture: Cover (front)", refreshing my
> collection, and restarting Elisa everything works as expected and all my
> album art shows up!
> 
> So Elisa seems to look for album art specifically tagged as "Picture: Cover
> (front)" and ignores everything else.

Nice catch, FlyingWaffle. It seams to be exactly my case: all the covers that did not appears in my case were tagged as "Picture: other", while the ones that works are "Picture: Cover (front)", so I would say that the problem is precisely this.
Comment 13 Matthieu Gallien 2020-09-20 08:24:14 UTC
(In reply to FlyingWaffle from comment #11)
> I had encountered the same issue on my Gentoo machine just recently and I
> think I've figured out what is going on.  When I checked my tags using Kid3
> I realized that all of my albums that were not showing artwork had the cover
> art tagged as "Picture" (with 'other' on the dropdown).  After editing the
> tags on all the affected albums to "Picture: Cover (front)", refreshing my
> collection, and restarting Elisa everything works as expected and all my
> album art shows up!
> 
> So Elisa seems to look for album art specifically tagged as "Picture: Cover
> (front)" and ignores everything else.

Thanks a lot for your analysis work.

Sorry for the delay in taking into account your message. I will try to have a look this week at fixing that. I cannot promise I will manage to do it but will do my best.
Comment 14 Matthieu Gallien 2020-11-02 21:35:29 UTC
Ongoing work on KFileMetaData, the KF5 framework used by Elisa to read the embedded cover image, will allow to fix this bug within Elisa. That will require (not yet released) version 5.75 of frameworks and a version of Elisa with the modified code.

I will keep this bug report in touch with the progress.
Comment 15 Nate Graham 2020-11-11 01:58:48 UTC

*** This bug has been marked as a duplicate of bug 426204 ***
Comment 16 Nate Graham 2020-11-11 01:59:39 UTC
*** Bug 426204 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2020-11-11 01:59:43 UTC
*** Bug 427719 has been marked as a duplicate of this bug. ***
Comment 18 Devin Lin 2021-02-18 03:29:46 UTC
Has there been any update on this? I am still experiencing missing cover art on most tracks.
Comment 19 SolidTemperature0 2021-07-27 08:47:16 UTC
Bug still present with Elisa 21.04.3 (as usual I also tried to deleting Elisa's db to re-import all the tracks).
Here the updated information about my system:
SOFTWARE/OS VERSIONS
Elisa: 21.04.3
Linux/KDE Plasma: Manjaro (Stable, up-to-date on 2021/7/27) (Kernel 5.13.4)
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.0

PS: I think also that reimporting the tracks make some of cover arts blurry: did something change in algorithm used for the scaling of the images or is it just my imagination?
Comment 20 Noah Westervelt 2021-08-09 04:05:00 UTC
I've also noticed that the embedded cover art doesn't show for songs that aren't part of an album. If I change the metadata of the song to say it's in an album, the cover art displays like it should.

I don't know if this is an intended behaviour or not, but I thought it was unintended.
Comment 21 Nate Graham 2021-08-23 14:57:40 UTC
*** Bug 441240 has been marked as a duplicate of this bug. ***
Comment 22 aronkvh 2021-12-13 17:48:05 UTC
I think I have the same issue with Elisa 21.12.0.
Dolphin, VLC and other apps show covers of mp3 files, but Elisa doesn't . I tried deleting the cache.
Comment 23 Philipp A. 2021-12-31 13:38:59 UTC
Huh. I had the same problem. Then I opened the files with EasyTAG, which by default deletes ID3v1 tags. I let it “fix” the files, which made Elisa no longer see the tracks at all. Then I configured EasyTag to write ID3v1 too, made it “fix” the files again, and now everything’s peachy.

The only visible change is that now the track numbers don’t have leading zeros anymore.

Could it be a caching issue? I also deleted a file whose name ended in -Cover.jpg because Elisa for some reason chose to display it instead of the embedded album art. So what could have happened is:

1. Elisa decides to use “Blahblah - Cover.jpg” for all files instead of the embedded covers (why?! Embedded art should be preferred, and why does “cover” somewhere in the file name trigger behavior?)
2. I delete the file. Speculation: Elisa doesn’t re-scan the files to find cover metadata, but simply doesn‘t display anything anymore (if this is true, also: why?! not finding the previous album art source should make Elisa re-discover album art)
3. I delete the ID3v1 tags. Elisa can’t extract metadata from the files anymore (why? kfilemetadata should work just fine in this case). Speculation: The cache gets invalidated, Elisa forgets the files
4. I re-add the ID3v1 tags. Speculation: Elisa re-finds the files and this time isn’t confused by image files that happen to have “cover” in their names. It finally successfully uses the embedded files.

Can a dev please go over this and check the individual parts? There’s 2 bugs here if my speculations are all wrong, and 3 if one of them is correct.
Comment 24 mitoyow169 2022-02-13 17:42:14 UTC
Im gonna try to summarize my findings since there appears to be a lot of conflicting statements.

1. The only art Elisa wont display is from files not in your library, it finds embedded art/cover.png just fine if its *indexed*, if not, it wont display anything, this is the issue that needs fixing and what is preventing me from using Elisa fulltime, as I use jellyfin for my library and thus don't want to make one in Elisa, but I still want art on the songs I do play with it.

2. Displaying cover.png over embed is intended behavior, if you don't want it to display cover.png, just delete it?
Comment 25 Nate Graham 2022-03-08 18:26:21 UTC
*** Bug 451025 has been marked as a duplicate of this bug. ***
Comment 26 trmdi 2022-04-30 02:31:54 UTC
Can you test this patch? https://invent.kde.org/multimedia/elisa/-/merge_requests/351
Comment 27 Nate Graham 2022-05-02 17:35:28 UTC
Git commit 0242be133c4ec180952743a7eff3a910eb77e7c4 by Nate Graham, on behalf of Tranter Madi.
Committed on 02/05/2022 at 17:35.
Pushed by ngraham into branch 'master'.

Increase visibility of the embedded cover art

- Accept other ID3 embedded image besides FrontCover
- Show embedded images for non-indexed tracks

M  +21   -4    src/embeddedcoverageimageprovider.cpp
M  +8    -5    src/filescanner.cpp

https://invent.kde.org/multimedia/elisa/commit/0242be133c4ec180952743a7eff3a910eb77e7c4
Comment 28 Nate Graham 2022-05-03 19:42:19 UTC
I believe Tranter Madi has fixed all of the cases of this with those commits! It seems to for me and my music collection, at least

Testing from people who were affected would be appreciated. You'll need to build Elisa from source, or use a distro that provides git master packages, such as Neon Testing or openSUSE Krypton.
Comment 29 Noah Westervelt 2022-05-11 01:58:26 UTC
(In reply to Nate Graham from comment #28)
> I believe Tranter Madi has fixed all of the cases of this with those
> commits! It seems to for me and my music collection, at least
> 
> Testing from people who were affected would be appreciated. You'll need to
> build Elisa from source, or use a distro that provides git master packages,
> such as Neon Testing or openSUSE Krypton.

I built Elisa from source to test, and I can confirm that the cover art for tracks not part of albums now displays correctly instead of displaying the green placeholder CD icon it used before.
Comment 30 indecisiveautomator 2022-05-23 19:35:02 UTC
I built Elisa from git and I think there is some unrelated buggyness that I am experiencing. However it seems like album art is being loaded correctly now for me. I even testing embedding some cover art in an album of songs using Strawberry, and when restarting Elisa it seemed to display the cover art!

Reloading my library in the Elisa built from source causes songs to disappear, until after 3 times my library is entirely empty. However I was still able to test this by importing a playlist for songs in that folder and Elisa displayed the correct album art there too. Likely the library reload bug is a separate issue and/or some kind of error on my part while building from source.

So for me, this seems resolved as well!  Using Elisa 22.07.70 on Arch Linux with KDE Plasma 5.24.5.
Comment 31 indecisiveautomator 2022-05-23 19:44:05 UTC
Oops, I spoke too soon. It seems like for FLAC audio, cover art is still not correctly loaded. My FLAC audio files still fall back a "cover.jpg" for an unrelated album that happens to be in the same folder. Other media players are able to read the embedded FLAC album art, however, so it should not be a problem specific to these FLAC files.

There is one other MP3 that is displaying the incorrect album art but it appears to be the only one in my library of thousands of songs. I believe I just embedded it with Strawberry like most of my library, however the only difference is the metadata it is tagged with was done using Audacity (before the embedded cover art was added). Perhaps that has messed something up there.

I'd be happy to provide more information to help debug if required.
Comment 32 trmdi 2022-05-23 21:02:29 UTC
(In reply to indecisiveautomator from comment #31)
> Oops, I spoke too soon. It seems like for FLAC audio, cover art is still not
> correctly loaded. My FLAC audio files still fall back a "cover.jpg" for an
> unrelated album that happens to be in the same folder. Other media players
> are able to read the embedded FLAC album art, however, so it should not be a
> problem specific to these FLAC files.
> 
> There is one other MP3 that is displaying the incorrect album art but it
> appears to be the only one in my library of thousands of songs. I believe I
> just embedded it with Strawberry like most of my library, however the only
> difference is the metadata it is tagged with was done using Audacity (before
> the embedded cover art was added). Perhaps that has messed something up
> there.
> 
> I'd be happy to provide more information to help debug if required.

You need to provide a minimal way to reproduce it...
Comment 33 indecisiveautomator 2022-05-23 21:33:51 UTC
For the FLAC files, I would imagine any FLAC audio with embedded cover art would do. Some are files that I embedded album art in using Strawberry, others are files I got from Band camp, it seems generally any FLAC audio files don't display cover art. So I'm not sure if there's a specific set of steps, but I'll add them here anyway.

1. Get some FLAC files with embedded cover art
2. Import these files into Elisa
3. They will either not have cover art or will fall back to a cover file in the same folder as the file such as "cover jog"

For the MP3 file I mentioned, I'm honestly not sure. It's the only MP3 file in my library that doesn't display its album art correctly and I can't tell why as other media players I've tried (Strawberry, VLC on Linux and Android) display the art for this file.
Comment 34 trmdi 2022-05-24 01:57:56 UTC
(In reply to indecisiveautomator from comment #33)
> For the FLAC files, I would imagine any FLAC audio with embedded cover art
> would do. Some are files that I embedded album art in using Strawberry,
> others are files I got from Band camp, it seems generally any FLAC audio
> files don't display cover art. So I'm not sure if there's a specific set of
> steps, but I'll add them here anyway.
> 
> 1. Get some FLAC files with embedded cover art
> 2. Import these files into Elisa
> 3. They will either not have cover art or will fall back to a cover file in
> the same folder as the file such as "cover jog"
> 
> For the MP3 file I mentioned, I'm honestly not sure. It's the only MP3 file
> in my library that doesn't display its album art correctly and I can't tell
> why as other media players I've tried (Strawberry, VLC on Linux and Android)
> display the art for this file.

You need to include your file to reproduce it too.
Comment 35 card_craft 2022-10-10 04:57:28 UTC
This also happens to me. I cant see any pattern. All the album art is visible from Dolphin.
Comment 36 SaeedB 2022-11-27 13:56:23 UTC
I have the same problem; audio files with embedded cover art but without the 'Album Artist' (and 'Album') tags set won't have said cover art displayed in Elisa - which is annoying since most songs I download tend to be obscure singles that don't belong to an album.
Comment 37 Knut Hildebrandt 2023-05-22 19:29:03 UTC Comment hidden (spam)
Comment 38 Nate Graham 2023-05-23 16:26:40 UTC Comment hidden (spam)