feat(mpd): add playing-interval option

This commit is contained in:
Theo Ratkin
2025-07-29 14:04:00 -04:00
parent 0776e694df
commit 03eba63215
5 changed files with 13 additions and 3 deletions
+3 -3
View File
@@ -119,14 +119,14 @@ bool Idle::on_io(Glib::IOCondition const&) {
void Playing::entry() noexcept {
sigc::slot<bool> timer_slot = sigc::mem_fun(*this, &Playing::on_timer);
timer_connection_ = Glib::signal_timeout().connect_seconds(timer_slot, 1);
spdlog::debug("mpd: Playing: enabled 1 second periodic timer.");
timer_connection_ = Glib::signal_timeout().connect(timer_slot, ctx_->playing_interval());
spdlog::debug("mpd: Playing: enabled {}ms periodic timer.", ctx_->playing_interval());
}
void Playing::exit() noexcept {
if (timer_connection_.connected()) {
timer_connection_.disconnect();
spdlog::debug("mpd: Playing: disabled 1 second periodic timer.");
spdlog::debug("mpd: Playing: disabled {}ms periodic timer.", ctx_->playing_interval());
}
}