diff --git a/ext/libclementine-remote/remotecontrolmessages.proto b/ext/libclementine-remote/remotecontrolmessages.proto index 6200ca1ab..e02c60a3f 100644 --- a/ext/libclementine-remote/remotecontrolmessages.proto +++ b/ext/libclementine-remote/remotecontrolmessages.proto @@ -34,6 +34,7 @@ enum MsgType { KEEP_ALIVE = 45; UPDATE_TRACK_POSITION = 46; ACTIVE_PLAYLIST_CHANGED = 47; + FIRST_DATA_SENT_COMPLETE = 48; } // Valid Engine states diff --git a/src/networkremote/outgoingdatacreator.cpp b/src/networkremote/outgoingdatacreator.cpp index a6099a978..d6d8ab845 100644 --- a/src/networkremote/outgoingdatacreator.cpp +++ b/src/networkremote/outgoingdatacreator.cpp @@ -165,9 +165,17 @@ void OutgoingDataCreator::SendFirstData() { // And the current playlists SendAllPlaylists(); + // Send the tracks of the active playlist + SendPlaylistSongs(app_->playlist_manager()->active_id()); + // Send the current random and repeat mode SendShuffleMode(app_->playlist_manager()->sequence()->shuffle_mode()); SendRepeatMode(app_->playlist_manager()->sequence()->repeat_mode()); + + // We send all first data + pb::remote::Message msg; + msg.set_type(pb::remote::FIRST_DATA_SENT_COMPLETE); + SendDataToClients(&msg); } void OutgoingDataCreator::CurrentSongChanged(const Song& song, const QString& uri, const QImage& img) {