Dont attempt to get current song if we are still inactive

This commit is contained in:
craig.p.drummond@gmail.com
2012-08-15 11:12:13 +00:00
parent 7d8691a642
commit 025ff2ee76

View File

@@ -2561,8 +2561,8 @@ void MainWindow::updateStatus(MPDStatus * const status)
// Check if song has changed or we're playing again after being stopped
// and update song info if needed
if (lastState == MPDState_Inactive
|| (lastState == MPDState_Stopped && status->state() == MPDState_Playing)
if ((MPDState_Inactive==lastState && MPDState_Inactive!=status->state())
|| (MPDState_Stopped==lastState && MPDState_Playing==status->state())
|| lastSongId != status->songId()) {
emit currentSong();
}