Support file url album art - Desktop
ClosedPublic

Authored by mtijink on Mar 4 2018, 1:08 PM.

Details

Summary

If the android code sees a file url, and album art is needed, it will start a request to transfer the album art. This code does some sanity checks to prevent abuse and then transfers the album art.

Test Plan

Art is transferred succesfully.

Diff Detail

Repository
R224 KDE Connect
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mtijink requested review of this revision.Mar 4 2018, 1:08 PM
mtijink created this revision.

The payloads API seems to be broken and is causing problems in the notifications plugin because we send the notification icons with it (see my email in the kdeconnect mailing list). I think we should make sure it works well before making more plugins use it.

The payloads API seems to be broken and is causing problems in the notifications plugin because we send the notification icons with it (see my email in the kdeconnect mailing list). I think we should make sure it works well before making more plugins use it.

Wasn't that due to transferring the icon twice at the same time? This code shouldn't do that, so that's not really a problem.

nicolasfella requested changes to this revision.Mar 17 2018, 2:17 PM
nicolasfella added a subscriber: nicolasfella.

Needs rebasing to master

This revision now requires changes to proceed.Mar 17 2018, 2:17 PM
mtijink updated this revision to Diff 29779.Mar 17 2018, 8:11 PM

Rebasing on master

Out of scope for this patch, but would it make sense to add KIO support for this? Media files could be on e.g. a samba share, but even then the thumbnails could be elsewhere (like /tmp)

Out of scope for this patch, but would it make sense to add KIO support for this? Media files could be on e.g. a samba share, but even then the thumbnails could be elsewhere (like /tmp)

I'm not sure what you mean. It doesn't really matter where the music files are stored, as long as the player puts the thumbnails in a file:// url. Vlc for example puts the thumbnails in the ~/.cache folder. I don't think players should (or do) actually publish smb:// album art urls, since these urls aren't supported everywhere.

I'm talking about supporting other protocols for thumbnail (other than file and https). But you're probably right, most players will use either file or http(s)

albertvaka accepted this revision.Mar 25 2018, 11:38 AM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 25 2018, 11:45 AM
This revision was automatically updated to reflect the committed changes.