diff --git a/src/bin/empc.c b/src/bin/empc.c index 9392f0a..6c9d3f7 100644 --- a/src/bin/empc.c +++ b/src/bin/empc.c @@ -286,7 +286,8 @@ empc_status(void *d EINA_UNUSED, int t EINA_UNUSED, Empd_Empc_Status_Data *ev) empd_empc_current_song_call(empd_proxy); up |= status_update(ev->state); if (up) title_update(); - if (empd_queue_length != ev->queue_length) + /* this should only run on startup...other updates are automatic */ + if ((!empd_queue_length) && (empd_queue_length != ev->queue_length)) { /* load current playlist incrementally (max 30): * - don't block daemon forever with large playlists diff --git a/src/bin/empdd.c b/src/bin/empdd.c index 1e766ad..b8693cf 100644 --- a/src/bin/empdd.c +++ b/src/bin/empdd.c @@ -108,6 +108,8 @@ static Eina_Mempool *slist_mempool = NULL; static Eldbus_Connection *dbus_conn = NULL; static Eldbus_Service_Interface *empd_iface = NULL; +static unsigned int empd_queue_version = 0; + static inline void fdh_update(void) { @@ -320,6 +322,13 @@ fdh_func(void *d EINA_UNUSED, Ecore_Fd_Handler *fdh EINA_UNUSED) mpd_status_get_total_time(st), mpd_status_get_elapsed_time(st), mpd_status_get_kbit_rate(st), af ? af->sample_rate : 0, af ? af->bits : 0, af ? af->channels : 0, mpd_status_get_next_song_pos(st), mpd_status_get_next_song_id(st)); + if (empd_queue_version && (empd_queue_version != mpd_status_get_queue_version(st))) + { + mpd_async_send_command(empd->async, "playlistinfo", NULL); + cmd_append(EMPD_COMMAND_QUEUE_LIST); + fdh_update(); + } + mpd_status_free(st); } }