module/mpd: "elapsed" tag is now a realtime tag (when state == playing)

This commit is contained in:
Daniel Eklöf 2018-12-27 11:44:46 +01:00
parent 025c6991a3
commit 99008c5ad9

View file

@ -95,7 +95,9 @@ content(struct module *mod)
tag_new_string("pos", pos),
tag_new_string("end", end),
tag_new_int("duration", m->duration),
tag_new_int_range("elapsed", m->elapsed, 0, m->duration),
tag_new_int_realtime(
"elapsed", m->elapsed, 0, m->duration,
m->state == STATE_PLAY ? TAG_REALTIME_SECONDS : TAG_REALTIME_NONE),
},
.count = 8,
};