diff --git a/src/spotify/spotify.cpp b/src/spotify/spotify.cpp index 6b05b5fd6..793ce11b8 100644 --- a/src/spotify/spotify.cpp +++ b/src/spotify/spotify.cpp @@ -239,6 +239,7 @@ bool Spotify::setDevice(Device device) device.id }; put("me/player", &body); + currentDevice = device.id; return true; } @@ -246,7 +247,7 @@ bool Spotify::playTracks(QStringList &trackIds) { QVariantMap body; body["uris"] = trackIds; - put("me/player/play", &body); + put(QString("me/player/play?device_id=%1").arg(currentDevice), &body); return true; } diff --git a/src/spotify/spotify.hpp b/src/spotify/spotify.hpp index 591fc519e..956e031e4 100644 --- a/src/spotify/spotify.hpp +++ b/src/spotify/spotify.hpp @@ -47,7 +47,8 @@ namespace spt void setVolume(int volume); void setRepeat(QString state); private: - QDateTime *lastAuth; + QDateTime *lastAuth; + QString currentDevice; QNetworkAccessManager *networkManager; /** * Prepare network request with auth header