summaryrefslogtreecommitdiffstats
path: root/mediaplayer
diff options
context:
space:
mode:
Diffstat (limited to 'mediaplayer')
-rw-r--r--mediaplayer/mediaplayer.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/mediaplayer/mediaplayer.cpp b/mediaplayer/mediaplayer.cpp
index 186cebe..7efbb7d 100644
--- a/mediaplayer/mediaplayer.cpp
+++ b/mediaplayer/mediaplayer.cpp
@@ -203,7 +203,14 @@ void Mediaplayer::onMessageReceived(MessageType type, Message *message)
if (tmsg->isPlaylistEvent()) {
updatePlaylist(tmsg->eventData().toVariantMap());
} else if (tmsg->isMetadataEvent()) {
- emit metadataChanged(tmsg->eventData().toVariantMap());
+ QVariantMap map = tmsg->eventData().toVariantMap();
+
+ if (map.contains("track") && map.value("track").toMap().contains("image")) {
+ m_context->setContextProperty("AlbumArt",
+ QVariant::fromValue(map.value("track").toMap().value("image")));
+ }
+
+ emit metadataChanged(map);
}
}
}