mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 12:10:03 +00:00
Update MPD elapsed/progress when stopped.
This commit is contained in:
parent
50fd16d8bd
commit
90932b87e1
@ -1,3 +1,6 @@
|
||||
2009-07-18
|
||||
* Update MPD elapsed/progress when stopped
|
||||
|
||||
2009-07-18
|
||||
* add compilation switch --enable-xoap to be able to use
|
||||
www.weather.com as a source of weather data (this avoids adding
|
||||
|
@ -197,7 +197,7 @@ static void *update_mpd_thread(void *arg)
|
||||
printf("error: %s\n", status->error);
|
||||
} */
|
||||
|
||||
switch(status->state) {
|
||||
switch (status->state) {
|
||||
case MPD_STATUS_STATE_PLAY:
|
||||
mpd_info.status = "Playing";
|
||||
break;
|
||||
@ -213,7 +213,11 @@ static void *update_mpd_thread(void *arg)
|
||||
break;
|
||||
}
|
||||
|
||||
if (status->state == MPD_STATUS_STATE_PLAY ||
|
||||
if (status->state == MPD_STATUS_STATE_STOP) {
|
||||
mpd_info.progress = (float) status->elapsedTime /
|
||||
status->totalTime;
|
||||
mpd_info.elapsed = status->elapsedTime;
|
||||
} else if (status->state == MPD_STATUS_STATE_PLAY ||
|
||||
status->state == MPD_STATUS_STATE_PAUSE) {
|
||||
mpd_info.is_playing = 1;
|
||||
mpd_info.bitrate = status->bitRate;
|
||||
|
Loading…
Reference in New Issue
Block a user