diff --git a/src/networkremote/incomingdataparser.cpp b/src/networkremote/incomingdataparser.cpp index c9527ffcd..af39290b6 100644 --- a/src/networkremote/incomingdataparser.cpp +++ b/src/networkremote/incomingdataparser.cpp @@ -42,6 +42,14 @@ IncomingDataParser::IncomingDataParser(Application* app) app_->player(), SLOT(SetVolume(int))); connect(this, SIGNAL(PlayAt(int,Engine::TrackChangeFlags,bool)), app_->player(), SLOT(PlayAt(int,Engine::TrackChangeFlags,bool))); + + // For some connects we have to wait for the playlistmanager + // to be initialized + connect(app_->playlist_manager(), SIGNAL(PlaylistManagerInitialized()), + this, SLOT(PlaylistManagerInitialized())); +} + +void IncomingDataParser::PlaylistManagerInitialized() { connect(this, SIGNAL(SetActivePlaylist(int)), app_->playlist_manager(), SLOT(SetActivePlaylist(int))); connect(this, SIGNAL(ShuffleCurrent()), diff --git a/src/networkremote/incomingdataparser.h b/src/networkremote/incomingdataparser.h index 39ae61ed5..9312cfeca 100644 --- a/src/networkremote/incomingdataparser.h +++ b/src/networkremote/incomingdataparser.h @@ -35,6 +35,9 @@ signals: void SetRepeatMode(PlaylistSequence::RepeatMode mode); void SetShuffleMode(PlaylistSequence::ShuffleMode mode); +private slots: + void PlaylistManagerInitialized(); + private: Application* app_; bool close_connection_;