Bug 416131 - Elisa doesn't export the Album Art to the Media Player applet
Summary: Elisa doesn't export the Album Art to the Media Player applet
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: 19.12.1
Platform: Archlinux Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
Depends on:
Reported: 2020-01-11 18:48 UTC by D. Debnath
Modified: 2020-03-20 15:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:

Works for me (465.07 KB, image/png)
2020-01-12 05:14 UTC, Nate Graham
strawberry vs elisa (306.56 KB, image/jpeg)
2020-01-12 14:01 UTC, Patrick Silva
Song that causes Media Player applet to receive an invalid art URL (3.80 MB, audio/mpeg)
2020-01-12 17:57 UTC, Nate Graham
Song that gives the Media Player applet a valid art URL (1.21 MB, audio/mp4)
2020-01-12 17:58 UTC, Nate Graham
attachment-15113-0.html (5.28 KB, text/html)
2020-03-20 04:02 UTC, D. Debnath

Note You need to log in before you can comment on or make changes to this bug.
Description D. Debnath 2020-01-11 18:48:52 UTC
The problem can easily seen this screenshot: https://i.imgur.com/cL09Aub.png

Album Art of the currently playing track should be displayed instead of the Elisa icon.
Comment 1 Nate Graham 2020-01-12 05:14:02 UTC
Created attachment 125051 [details]
Works for me

Works for me--for that exact song, even. :)
Comment 2 Patrick Silva 2020-01-12 14:01:40 UTC
Created attachment 125057 [details]
strawberry vs elisa

I can confim with elisa 19.12.1 from Arch repos.
Apparently it's a random problem.
My attachment shows strawberry and elisa playing the same file.
Comment 3 Nate Graham 2020-01-12 17:44:37 UTC
Ah, I found a way to reliably reproduce this: you need to have multiple playback streams going such that the applet has a combobox that allows you to select which one it controls. When the combobox shows "Elisa" or "Choose player automatically".

Now I'm wondering if this really is Elisa's fault or of it's a bug in the Media Player applet.
Comment 4 Nate Graham 2020-01-12 17:56:19 UTC
Never mind, that was a red herring, and this is definitely an Elisa bug.

Using Plasma Engine Explorer (`plasmaengineexplorer`) I can see that the problem is that *sometimes* Elisa sends the mpris2 data enging an mpris:arturl metadata tag that looks like "image://cover/home/nate/Music/System of a Down/Hypnotize/10 She's like Heroin.mp3". URLs like this show no album art in the Media Player applet. However at other times it sends a file:// URL to an image file.

For me it depends on the song, which points to some issue in the way the album art is stores for these songs. I will attach two songs from y collection, one that triggers the issue and one that does not.
Comment 5 Nate Graham 2020-01-12 17:57:36 UTC
Created attachment 125064 [details]
Song that causes Media Player applet to receive an invalid art URL
Comment 6 Nate Graham 2020-01-12 17:58:33 UTC
Created attachment 125065 [details]
Song that gives the Media Player applet a valid art URL
Comment 7 Alexander Stippich 2020-01-21 18:44:32 UTC
The ones with "image://..." urls are the ones with embedded cover art, which is dynamically loaded from the file.
Comment 8 Nate Graham 2020-01-21 18:46:16 UTC
Interesting. Is there a way to translate this to a file path that the MPRIS data engine can see? Or would we need to give it the capacity to handle those kinds of paths by extracting the image on the fly using KFileMetadata or something?
Comment 9 Alexander Stippich 2020-01-21 19:00:14 UTC
Though the MPRIS spec does not explicitly state this, I guess it actually needs a valid url to an image file. In that case, Elisa must extract the image from the metadata.
Comment 10 Matthieu Gallien 2020-01-21 20:29:46 UTC
Thanks for the analysis work. Well done !

The easiest solution (at least from my point of view) is probably to use data embedded in the url (https://en.wikipedia.org/wiki/Data_URI_scheme).

That allow to use the data in the track without duplicating it anywhere. This way the visualization would get the data in a correct way (valid url). It would look like the current image provider that uses directly the data from the track.

I can work on that when I will have more time but do not expect me before a few weeks at least.
Comment 11 Matthieu Gallien 2020-03-19 14:16:47 UTC
I will work on that for the next stable release.
Comment 12 Matthieu Gallien 2020-03-19 21:34:36 UTC
https://invent.kde.org/kde/elisa/-/merge_requests/105 is a candidate fix pending review.

Please test if you can ?
Comment 13 D. Debnath 2020-03-20 04:02:27 UTC
Created attachment 126900 [details]

I tried to run kdesrc-build and it's failing to install (compiled successfully) with the following error:
CMake Error at cmake_install.cmake:41 (file):
file INSTALL cannot copy file
"/home/debnath/kde/src/elisa/org.kde.elisa.desktop" to
"/usr/share/applications/org.kde.elisa.desktop": Permission denied.

I believe, this is trying to replace the desktop file of my stable Elisa app from my distro, which is not what it should be doing.

​Also, I tried to kdesrc-run elisa which gives the following error:
QQmlApplicationEngine failed to load component
qrc:/qml/ElisaMainWindow.qml:182:13: Type HeaderBar unavailable
qrc:/qml/HeaderBar.qml:307:25: Type SimplePlayListView unavailable
qrc:/qml/SimplePlayListView.qml:100:13: Type PlayListEntry unavailable
qrc:/qml/PlayListEntry.qml:72:27: Type MediaTrackMetadataView unavailable
qrc:/qml/MediaTrackMetadataView.qml:49:5: EditableTrackMetadataModel is not a type
From: Matthieu Gallien <bugzilla_noreply@kde.org>
Sent: 20 March 2020 3:04 AM
To: d_debnath@outlook.com <d_debnath@outlook.com>
Subject: [elisa] [Bug 416131] Elisa doesn't export the Album Art to the Media Player applet


--- Comment #12 from Matthieu Gallien <matthieu_gallien@yahoo.fr> ---
https://invent.kde.org/kde/elisa/-/merge_requests/105 is a candidate fix
pending review.

Please test if you can ?

You are receiving this mail because:
You reported the bug.
Comment 14 Nate Graham 2020-03-20 14:58:23 UTC
Yeah, it's trying to install Elisa on top of the system version in /usr, which is incorrect. It looks like your ~/.kdesrc-buildrc file is misconfigured. The correct values in that file are more like this:

    # Install directory for KDE software
    kdedir ~/kde/usr

    # Directory for downloaded source code
    source-dir ~/kde/src

    # Directory to build KDE into before installing
    # relative to source-dir by default
    build-dir ~/kde/build

Also these kinds of questions would ideally be asked in the kde-devel channel. See https://community.kde.org/Get_Involved#Getting_in_touch_and_working_together
Comment 15 Matthieu Gallien 2020-03-20 15:01:35 UTC
Git commit e674a748c18b14161d71538522c33838c1735f52 by Matthieu Gallien.
Committed on 20/03/2020 at 15:00.
Pushed by mgallien into branch 'release/20.04'.

fix invalid URL when sending cover image in mpris for embedded covers

use a base 64 encoded data url with inline image data

M  +21   -1    src/mpris2/mediaplayer2player.cpp