status: fire song id change event after song ends with consume flag
fixes http://bugs.musicpd.org/view.php?id=4082
This commit is contained in:
@@ -61,6 +61,8 @@ char m_crossfade = 0;
|
|||||||
char m_db_updating = 0;
|
char m_db_updating = 0;
|
||||||
|
|
||||||
MPD::Status m_status;
|
MPD::Status m_status;
|
||||||
|
// needed for the way events are emitted in consume mode after song ends
|
||||||
|
int m_current_song_id = 0;
|
||||||
unsigned m_elapsed_time = 0;
|
unsigned m_elapsed_time = 0;
|
||||||
|
|
||||||
void drawTitle(const MPD::Song &np)
|
void drawTitle(const MPD::Song &np)
|
||||||
@@ -176,8 +178,11 @@ void Status::update(int event)
|
|||||||
if (event & MPD_IDLE_PLAYER)
|
if (event & MPD_IDLE_PLAYER)
|
||||||
{
|
{
|
||||||
Changes::playerState();
|
Changes::playerState();
|
||||||
if (old_status.empty() || old_status.currentSongID() != m_status.currentSongID())
|
if (m_current_song_id != m_status.currentSongID())
|
||||||
|
{
|
||||||
|
m_current_song_id = m_status.currentSongID();
|
||||||
Changes::songID();
|
Changes::songID();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (event & MPD_IDLE_MIXER)
|
if (event & MPD_IDLE_MIXER)
|
||||||
Changes::mixer();
|
Changes::mixer();
|
||||||
|
|||||||
Reference in New Issue
Block a user