summaryrefslogtreecommitdiffstats
path: root/app/api/MediaPlayer.qml
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-11-06 18:29:39 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-11-06 22:05:16 -0800
commit355c4f0f70af36eabfb78d49adec52e91e766865 (patch)
tree2859ae5e9689897f93ff951b0be767f6043b91f3 /app/api/MediaPlayer.qml
parent6144ad632808c3a6cfbaf2a4e241fb2bc631def0 (diff)
mediaplayer: qml: get initial metadata from playlist on startup
Get initial metadata from first item on playlist on application startup Bug-AGL: SPEC-1052 Change-Id: I4bc32da682005808955dc3fad5568dd03bd84331 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'app/api/MediaPlayer.qml')
-rw-r--r--app/api/MediaPlayer.qml4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/api/MediaPlayer.qml b/app/api/MediaPlayer.qml
index ffdb870..c7f4ff2 100644
--- a/app/api/MediaPlayer.qml
+++ b/app/api/MediaPlayer.qml
@@ -72,6 +72,9 @@ WebSocket {
root.running = response.playing
}
} else if (verb == "metadata") {
+ root.title = response.title ? response.title : ''
+ root.artist = response.artist ? response.artist : ''
+
root.cover_art = response.image ? response.image : ''
}
break
@@ -135,6 +138,7 @@ WebSocket {
sendSocketMessage("subscribe", { value: "metadata" })
sendSocketMessage("playlist", 'None')
sendSocketMessage("subscribe", { value: "playlist" })
+ sendSocketMessage("metadata", 'None')
break
case WebSocket.Error:
root.statusString = "WebSocket error: " + root.errorString