v0.1.18
build / test (push) Waiting to run

This commit is contained in:
Mateusz Gruszczyński committed 2026-11-17 19:02:49 +01:00
1 parent 9e65aa0103
commit 4f4a7bcc5a
3 files changed
+25 -2

No files matched your search

Generated
+1 -1
View File
@@ -1894,7 +1894,7 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
[[package]]
name = "simply-dvb"
version = "0.1.17"
version = "0.1.18"
dependencies = [
"anyhow",
"argon2",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "simply-dvb"
version = "0.1.17"
version = "0.1.18"
edition = "2021"
rust-version = "1.85"
description = "simply-dvb - lightweight DVB-T/T2/C server: scanning, HLS, M3U, EPG/XMLTV, recording and a web panel"
+23
View File
@@ -635,6 +635,18 @@ async fn status_inputs(
let host_cpu = host.as_ref().and_then(|s| s.cpu);
let host_proc_cpu = host.as_ref().and_then(|s| s.proc_cpu);
let host_temp = host.as_ref().and_then(|s| s.temp);
// `?since=<unix s>`: the samples newer than that from the statistics history the
// server keeps anyway (every 2 s, 15 minutes) – the simply-tv tuner card draws its
// charts from it, so they show the last minutes at once instead of starting empty
let hist = p
.i64("since")
.map(|since| state.stats.history(since.max(crate::db::now() - 900)));
let host_hist: Option<Vec<Value>> = hist.as_ref().map(|h| {
h.samples
.iter()
.map(|s| json!([s.t, s.cpu, s.proc_cpu]))
.collect()
});
grid(
state
.tuners
@@ -679,6 +691,17 @@ async fn status_inputs(
"packets": a.map(|a| a.ts.packets).unwrap_or(0),
"status_ms": a.map(|a| a.status_ms),
"read_gap_ms": a.map(|a| a.read_gap_ms),
"history": hist.as_ref().map(|h| {
h.tuners
.get(&t.id)
.map(|v| {
v.iter()
.map(|x| json!([x.t, x.strength, x.snr, x.bitrate]))
.collect::<Vec<_>>()
})
.unwrap_or_default()
}),
"host_history": host_hist,
"server_cpu": host_cpu,
"server_proc_cpu": host_proc_cpu,
"server_temp": host_temp,