Don't advance the timer when not playing
Stupid regression.
This commit is contained in:
parent
515d11114b
commit
319d0faffa
10
nncmpp.c
10
nncmpp.c
|
@ -1623,12 +1623,14 @@ mpd_on_info_response (const struct mpd_response *response,
|
||||||
if (xstrtoul (&tmp, elapsed, 10))
|
if (xstrtoul (&tmp, elapsed, 10))
|
||||||
g_ctx.song_elapsed = tmp;
|
g_ctx.song_elapsed = tmp;
|
||||||
|
|
||||||
if (g_ctx.state == PLAYER_PLAYING
|
if (xstrtoul (&tmp, period, 10))
|
||||||
&& xstrtoul (&tmp, period, 10))
|
|
||||||
msec_past_second = tmp;
|
msec_past_second = tmp;
|
||||||
}
|
}
|
||||||
poller_timer_set (&g_ctx.elapsed_event, 1000 - msec_past_second);
|
if (g_ctx.state == PLAYER_PLAYING)
|
||||||
g_ctx.elapsed_since = clock_msec (CLOCK_BEST) - msec_past_second;
|
{
|
||||||
|
poller_timer_set (&g_ctx.elapsed_event, 1000 - msec_past_second);
|
||||||
|
g_ctx.elapsed_since = clock_msec (CLOCK_BEST) - msec_past_second;
|
||||||
|
}
|
||||||
|
|
||||||
// The server sends -1 when nothing is being played right now
|
// The server sends -1 when nothing is being played right now
|
||||||
char *volume = str_map_find (&map, "volume");
|
char *volume = str_map_find (&map, "volume");
|
||||||
|
|
Loading…
Reference in New Issue