Bug 467785 - [NOT A BUG] Spotify Album Art is not displayed inside media player
Summary: [NOT A BUG] Spotify Album Art is not displayed inside media player
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: Media Player widget (show other bugs)
Version: 5.27.1
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-25 18:02 UTC by GoldBarb
Modified: 2023-03-25 22:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description GoldBarb 2023-03-25 18:02:22 UTC
SUMMARY
***

Note. this is not a bug, but an issue with the Spotify client.
This is just a comment on how I was able to create a workaround.

When playing audio through Spotify, the media controller applet refuses to render the album art of the playing track.

The journal logs show.

file:///usr/share/plasma/plasmoids/org.kde.plasma.mediacontroller/contents/ui/AlbumArtStackView.qml:132:13: QML Image: Error decoding: https://open.spotify.com/image/ab67616d00001e021cf647cd17bc7382a8056456: Unsupported image format

Spotify is incorrectly using some invalid the album art url.

qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata
mpris:artUrl: https://open.spotify.com/image/ab67616d00001e021cf647cd17bc7382a8056456

Workaround.

I made an update locally to main.qml

Commented out
https://invent.kde.org/plasma/plasma-workspace/-/blob/master/applets/mediacontroller/package/contents/ui/main.qml#L51

Added.

 property string albumArt: {
        if (!currentMetadata){
            return ""
        }
        var mprisArtUrl = currentMetadata["mpris:artUrl"].toString()
        if (mprisArtUrl.length > 0){

            if (mprisArtUrl.indexOf("https://open.spotify.com") == 0){
                return mprisArtUrl.replace("https://open.spotify.com","https://i.scdn.co")
            }
        }
    }

Then restarted the plasma-plasmashell service.
After the restart the media controller applet now displays the album art.


***


STEPS TO REPRODUCE
1. Play music using Spotify, with the media controller applet loaded
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION