diff options
Diffstat (limited to '')
-rw-r--r-- | src/PlayerCommands.cxx | 18 | ||||
-rw-r--r-- | src/PlayerControl.cxx | 2 | ||||
-rw-r--r-- | src/PlayerThread.cxx | 4 |
3 files changed, 15 insertions, 9 deletions
diff --git a/src/PlayerCommands.cxx b/src/PlayerCommands.cxx index 32cd16d9d..1c1c346b7 100644 --- a/src/PlayerCommands.cxx +++ b/src/PlayerCommands.cxx @@ -169,19 +169,23 @@ handle_status(Client *client, } if (player_status.state != PLAYER_STATE_STOP) { - struct audio_format_string af_string; - client_printf(client, COMMAND_STATUS_TIME ": %i:%i\n" "elapsed: %1.3f\n" - COMMAND_STATUS_BITRATE ": %u\n" - COMMAND_STATUS_AUDIO ": %s\n", + COMMAND_STATUS_BITRATE ": %u\n", (int)(player_status.elapsed_time + 0.5), (int)(player_status.total_time + 0.5), player_status.elapsed_time, - player_status.bit_rate, - audio_format_to_string(&player_status.audio_format, - &af_string)); + player_status.bit_rate); + + if (audio_format_defined(&player_status.audio_format)) { + struct audio_format_string af_string; + + client_printf(client, + COMMAND_STATUS_AUDIO ": %s\n", + audio_format_to_string(&player_status.audio_format, + &af_string)); + } } if ((updateJobId = isUpdatingDB())) { diff --git a/src/PlayerControl.cxx b/src/PlayerControl.cxx index d3e8c7d08..790abcd50 100644 --- a/src/PlayerControl.cxx +++ b/src/PlayerControl.cxx @@ -104,8 +104,6 @@ player_control::Play(struct song *song) assert(next_song == nullptr); Unlock(); - - idle_add(IDLE_PLAYER); } void diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx index 599df833d..2d8e6caaf 100644 --- a/src/PlayerThread.cxx +++ b/src/PlayerThread.cxx @@ -335,6 +335,8 @@ player_open_output(struct player *player) pc->state = PLAYER_STATE_PLAY; pc->Unlock(); + idle_add(IDLE_PLAYER); + return true; } else { g_warning("%s", error->message); @@ -399,6 +401,8 @@ player_check_decoder_startup(struct player *player) pc->audio_format = dc->in_audio_format; pc->Unlock(); + idle_add(IDLE_PLAYER); + player->play_audio_format = dc->out_audio_format; player->decoder_starting = false; |