- Send the playlisttracks from the currenly active one in SendFirstData().

- New proto type FIRST_DATA_SENT_COMPLETE: Is send, when the method SendFirstData() finishes.
This commit is contained in:
Andreas 2013-03-21 16:14:13 +01:00
parent be68c9f702
commit 7939890545
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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) {