app: reach the daemon and load the real history
The pipe path was missing a backslash, so every client call went to a path Windows never resolves and the app reported a dead daemon. With the path fixed, --probe answers against the running daemon and parses its settings with the app's model; a recording made through it lands on disk. Reading a large history (288 timelines, 524 MB of raw API responses) took eleven seconds, so the files are parsed on up to eight threads now. The history refresh also runs in headless runs, and `--live` renders a snapshot from the daemon and the real timelines instead of sample data.
This commit is contained in:
1 parent
8883e93d2b
commit
b06ec4be7b
5 files changed
+81
-32
No files matched your search
+9
-8
@@ -128,11 +128,13 @@ impl App {
|
||||
pub fn new() -> Self {
|
||||
let autostart = os::autostart_enabled();
|
||||
let headless = headless();
|
||||
// `--live` renders headless but talks to the daemon and reads the real recordings.
|
||||
let live = std::env::args().any(|arg| arg == "--live");
|
||||
let mut app = Self {
|
||||
screen: Screen::History,
|
||||
settings_tab: SettingsTab::General,
|
||||
dark: true,
|
||||
daemon: Daemon::start(headless),
|
||||
daemon: Daemon::start(headless && !live),
|
||||
connected: false,
|
||||
status: Status::default(),
|
||||
settings: None,
|
||||
@@ -153,7 +155,7 @@ impl App {
|
||||
tray_recording: false,
|
||||
waker: None,
|
||||
};
|
||||
if headless {
|
||||
if headless && !live {
|
||||
app.demo();
|
||||
}
|
||||
app
|
||||
@@ -293,6 +295,11 @@ fn hide_window() {
|
||||
pub fn setup(app: &mut App, waker: rune::Waker) {
|
||||
app.waker = Some(waker.clone());
|
||||
app.daemon.set_waker(waker.clone());
|
||||
app.refresh_settings();
|
||||
app.refresh_games();
|
||||
app.daemon.get_status();
|
||||
app.daemon.get_encoders();
|
||||
app.daemon.get_audio_devices();
|
||||
if headless() {
|
||||
return;
|
||||
}
|
||||
@@ -312,12 +319,6 @@ pub fn setup(app: &mut App, waker: rune::Waker) {
|
||||
}
|
||||
Err(e) => eprintln!("tray icon unavailable: {e}"),
|
||||
}
|
||||
|
||||
app.refresh_settings();
|
||||
app.refresh_games();
|
||||
app.daemon.get_status();
|
||||
app.daemon.get_encoders();
|
||||
app.daemon.get_audio_devices();
|
||||
}
|
||||
|
||||
impl App {
|
||||
|
||||
Reference in new issue
Block a user