new feature: custom command execution on song change

This commit is contained in:
Andrzej Rybczak
2009-05-21 23:05:53 +02:00
parent 3d9c242f4d
commit 7eb74a6da2
4 changed files with 15 additions and 0 deletions

View File

@@ -343,6 +343,8 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
if (myPlaylist->isPlaying())
{
np = Mpd->GetCurrentSong();
if (!Config.execute_on_song_change.empty())
system(np.toString(Config.execute_on_song_change).c_str());
if (Mpd->GetState() > psStop)
WindowTitle(utf_to_locale_cpy(np.toString(Config.song_window_title_format)));
if (Config.autocenter_mode && !myPlaylist->Main()->isFiltered())