2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 06:05:12 +00:00

Don't convert shuffle value to String when sending the command

This commit is contained in:
Łukasz Patron
2021-06-23 10:18:31 +02:00
committed by Nicolas Fella
parent 8da49741f2
commit 843d25d112

View File

@@ -200,7 +200,7 @@ public class MprisPlugin extends Plugin {
}
public void setShuffle(boolean shuffle) {
MprisPlugin.this.sendCommand(getPlayer(), "setShuffle", String.valueOf(shuffle));
MprisPlugin.this.sendCommand(getPlayer(), "setShuffle", shuffle);
}
public void setVolume(int volume) {
@@ -281,6 +281,13 @@ public class MprisPlugin extends Plugin {
device.sendPacket(np);
}
private void sendCommand(String player, String method, boolean value) {
NetworkPacket np = new NetworkPacket(PACKET_TYPE_MPRIS_REQUEST);
np.set("player", player);
np.set(method, value);
device.sendPacket(np);
}
private void sendCommand(String player, String method, int value) {
NetworkPacket np = new NetworkPacket(PACKET_TYPE_MPRIS_REQUEST);
np.set("player", player);