Commit 1742ccf3 authored by Alex Merry's avatar Alex Merry
Browse files

Construct the MPRIS1 arturl the same way as the MPRIS2 mpris:artUrl

Now we try to get the full size version before falling back to a reduced
version, and we encode the URL properly.

BUG: 278550
FIXED-IN: 2.6
parent e5cea18a
......@@ -17,6 +17,7 @@ VERSION 2.6
* Don't crash even if the iPod is connected and quickly ejected. (BR 301166)
* Play the correct track when adding tracks to a sorted playlist. (BR
244595)
* Provide full-size covers via MPRIS1 if available. (BR 278550)
VERSION 2.6-Beta 1
FEATURES:
......
......@@ -134,6 +134,17 @@ Meta::Field::mprisMapFromTrack( const Meta::TrackPtr track )
map["album"] = track->album()->name();
if( track->album()->hasAlbumArtist() && !track->album()->albumArtist()->name().isEmpty() )
map[ "albumartist" ] = track->album()->albumArtist()->name();
QImage image = track->album()->image();
KUrl url = track->album()->imageLocation().url();
if ( url.isValid() && !url.isLocalFile() ) {
// embedded id? Request a version to be put in the cache
debug() << "MPRIS: asking the image to be cached";
track->album()->image( MPRIS_IMAGE_SIZE );
url = track->album()->imageLocation().url();
}
if ( url.isValid() && url.isLocalFile() )
map["arturl"] = QString::fromLatin1( url.toEncoded() );
}
map["tracknumber"] = track->trackNumber();
......@@ -149,9 +160,6 @@ Meta::Field::mprisMapFromTrack( const Meta::TrackPtr track )
if( track->year() )
map["year"] = track->year()->name();
if( track->album() )
map["arturl"] = track->album()->imageLocation( MPRIS_IMAGE_SIZE ).url();
//TODO: external service meta info
// TECHNICAL:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment