mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-08-01 16:14:11 +00:00
feat(lib, daemon, gui): daemon version in fullstate and gui (#180)
* add daemon_version field to the FullState * add daemon version to the pwsp-gui settings page
This commit is contained in:
@@ -59,6 +59,7 @@ pub struct FullState {
|
||||
pub all_inputs: HashMap<String, String>,
|
||||
pub current_output: String,
|
||||
pub all_outputs: HashMap<String, String>,
|
||||
pub daemon_version: String,
|
||||
}
|
||||
|
||||
/// Which of the two independent output paths a volume applies to.
|
||||
|
||||
@@ -684,6 +684,7 @@ impl Executable for GetFullStateCommand {
|
||||
all_inputs,
|
||||
current_output: audio_player.output_device_name.clone().unwrap_or_default(),
|
||||
all_outputs,
|
||||
daemon_version: env!("CARGO_PKG_VERSION").into(),
|
||||
};
|
||||
|
||||
match serde_json::to_string(&full_state) {
|
||||
|
||||
@@ -130,6 +130,7 @@ pub struct AudioPlayerState {
|
||||
pub all_outputs_sorted: Vec<(String, String)>,
|
||||
|
||||
pub is_daemon_running: bool,
|
||||
pub daemon_version: String,
|
||||
|
||||
pub hotkey_config: Option<HotkeyConfig>,
|
||||
}
|
||||
|
||||
@@ -148,6 +148,7 @@ pub fn start_app_state_thread(audio_player_state_shared: Arc<Mutex<AudioPlayerSt
|
||||
}
|
||||
|
||||
guard.is_daemon_running = true;
|
||||
guard.daemon_version = full_state.daemon_version;
|
||||
}
|
||||
|
||||
// Poll hotkey config at a lower frequency (~every 2 seconds)
|
||||
|
||||
Reference in New Issue
Block a user