Bug 345015

Summary: No coverart of the currently playing media in the MPRIS plug-in
Product: [Applications] kdeconnect Reporter: Ashish Madeti <ashishmadeti>
Component: android-applicationAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED FIXED    
Severity: wishlist CC: aleixpol
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ashish Madeti 2015-03-10 15:50:03 UTC
The MPRIS remote control should show coverart of the currently playin media.

Reproducible: Always

Steps to Reproduce:
1.Play a media with a valid coverart with any mpris enabled media player.
2."Open remote control" in kde connect android app.

Actual Results:  
We can cotrol the now playing media but we cannot see the cover art.

Expected Results:  
The cover art of the currently playin media should be visible somewhere in the remote control.

The coverart is available (optional) in the metadata of the track, under the field "mpris:artUrl".
http://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata/#index3h4
Comment 1 Aleix Pol 2018-01-16 23:49:08 UTC
See https://phabricator.kde.org/D9564
Comment 2 Matthijs Tijink 2018-02-24 15:21:21 UTC
Git commit 0d00b8aa4ac3f88485797e09950b713483273f63 by Matthijs Tijink.
Committed on 24/02/2018 at 15:21.
Pushed by mtijink into branch 'master'.

Add album cover art support.

Summary:
Fetches http(s) album art urls, as supplied by MPRIS, to display as album art. Fetched urls and failed fetches are cached to prevent unneccessary network activity.

The bulk of the code is in the fetching+caching class `AlbumArtCache`.

Takes the comments from d52be10 into account:
 - The images (HTTP(S) only for now) are cached. This is limited to 5 MB on disk or 10 entries in memory.
 - The image gets viewing space depending on the remaining screen space. Thus, controls should never be pushed off-screen.
 - "Edge cases" like going from cover art to no cover art is handled correctly (actually a result of earlier mpris code changes).

Additionally, it adds a landscape mode to the MPRIS activity, which shows the cover art and controls side by side.

Desktop part is in D9563.

Test Plan: Works both with/without album art. Switching players and tracks correctly changes the album art.

Reviewers: #kde_connect, #vdg, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, ngraham, nicolasfella, apol

Differential Revision: https://phabricator.kde.org/D9564

M  +1    -0    build.gradle
A  +9    -0    res/drawable/ic_album_art_placeholder.xml
A  +26   -0    res/layout-land/activity_mpris.xml
A  +25   -0    res/layout/activity_mpris.xml
M  +1    -4    res/layout/mpris_control.xml
A  +428  -0    src/org/kde/kdeconnect/Plugins/MprisPlugin/AlbumArtCache.java
M  +14   -1    src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java
M  +46   -0    src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisPlugin.java

https://commits.kde.org/kdeconnect-android/0d00b8aa4ac3f88485797e09950b713483273f63