jump to current song at startup even if it's not currently played

This commit is contained in:
Andrzej Rybczak
2012-07-13 23:23:44 +02:00
parent f96b4fc776
commit a14b77338d
6 changed files with 21 additions and 14 deletions

View File

@@ -342,8 +342,9 @@ int main(int argc, char **argv)
if (Config.jump_to_now_playing_song_at_start)
{
TraceMpdStatus();
if (myPlaylist->isPlaying())
myPlaylist->Items->Highlight(myPlaylist->NowPlaying);
int curr_pos = Mpd.GetCurrentSongPos();
if (curr_pos >= 0)
myPlaylist->Items->Highlight(curr_pos);
}
while (!main_exit)