Add album cover art support.

Authored by mtijink on Dec 11 2017, 2:36 PM.

Description

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.

FEATURE: 345015

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

Details

Committed
mtijinkFeb 24 2018, 3:21 PM
Reviewer
KDE Connect
Differential Revision
D9564: Add album cover art support.
Parents
R225:e9a35d3bb2fd: Allow to blacklist numbers in the telephony plugin
Branches
Unknown
Tags
Unknown