summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-02-20 20:42:29 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-02-21 06:21:31 +0000
commitb38d75787fffb5d921224b45d15d86631c6b1755 (patch)
tree17e8db478663848db8cf0c1a0de4b481df646d56
parent9ddd8745ecf8a591190bf3a6226523e834020208 (diff)
libqtappfw: mediaplayer: update loop command parameter
state parameter needs to be able to set to a respective string to enable various loop functionality (e.g. playlist, track, or off) This patchset needs to be merged, and respective SRCREV in the recipe to be updated before additional changes to avoid breakage. Bug-AGL: SPEC-2181 Change-Id: I37de12f7ed02fba5e15ef45c3a854967264f2014 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r--mediaplayer/mediaplayer.cpp4
-rw-r--r--mediaplayer/mediaplayer.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/mediaplayer/mediaplayer.cpp b/mediaplayer/mediaplayer.cpp
index 2a24464..0ef7d34 100644
--- a/mediaplayer/mediaplayer.cpp
+++ b/mediaplayer/mediaplayer.cpp
@@ -156,10 +156,10 @@ void Mediaplayer::volume(int volume)
control("volume", parameter);
}
-void Mediaplayer::loop(int state)
+void Mediaplayer::loop(QString state)
{
QJsonObject parameter;
- parameter.insert("state", state ? "true" : "false");
+ parameter.insert("state", state);
control("loop", parameter);
}
diff --git a/mediaplayer/mediaplayer.h b/mediaplayer/mediaplayer.h
index baefb01..fe49be4 100644
--- a/mediaplayer/mediaplayer.h
+++ b/mediaplayer/mediaplayer.h
@@ -87,7 +87,7 @@ class Mediaplayer : public QObject
Q_INVOKABLE void rewind(int);
Q_INVOKABLE void picktrack(int);
Q_INVOKABLE void volume(int);
- Q_INVOKABLE void loop(int);
+ Q_INVOKABLE void loop(QString);
void updatePlaylist(QVariantMap playlist);