mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 18:45:10 +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
|
2009-07-18
|
||||||
* add compilation switch --enable-xoap to be able to use
|
* add compilation switch --enable-xoap to be able to use
|
||||||
www.weather.com as a source of weather data (this avoids adding
|
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);
|
printf("error: %s\n", status->error);
|
||||||
} */
|
} */
|
||||||
|
|
||||||
switch(status->state) {
|
switch (status->state) {
|
||||||
case MPD_STATUS_STATE_PLAY:
|
case MPD_STATUS_STATE_PLAY:
|
||||||
mpd_info.status = "Playing";
|
mpd_info.status = "Playing";
|
||||||
break;
|
break;
|
||||||
@ -213,7 +213,11 @@ static void *update_mpd_thread(void *arg)
|
|||||||
break;
|
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) {
|
status->state == MPD_STATUS_STATE_PAUSE) {
|
||||||
mpd_info.is_playing = 1;
|
mpd_info.is_playing = 1;
|
||||||
mpd_info.bitrate = status->bitRate;
|
mpd_info.bitrate = status->bitRate;
|
||||||
|
Loading…
Reference in New Issue
Block a user