mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 08:15:02 -05:00
Don't report negative remaining times for streams
This commit is contained in:
parent
3afd206e93
commit
7841e59afc
@ -178,7 +178,11 @@ dacp_playingtime(struct evbuffer *evbuf, struct player_status *status, struct me
|
||||
if ((status->status == PLAY_STOPPED) || !mfi)
|
||||
return;
|
||||
|
||||
if (mfi->song_length)
|
||||
dmap_add_int(evbuf, "cant", mfi->song_length - status->pos_ms); /* Remaining time in ms */
|
||||
else
|
||||
dmap_add_int(evbuf, "cant", 0); /* Unknown remaining time */
|
||||
|
||||
dmap_add_int(evbuf, "cast", mfi->song_length); /* Song length in ms */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user