Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ rustls = { version = "0.23", features = ["aws_lc_rs"] }
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }

# Same revision for shared types.
punktfunk-core = { git = "https://git.unom.io/unom/punktfunk", rev = "9eb2eb64113b6848e921a7153edd2248b8f61d7a", features = ["quic", "chacha-aws-lc-rs", "l10n"] }
pf-client-core = { git = "https://git.unom.io/unom/punktfunk", rev = "9eb2eb64113b6848e921a7153edd2248b8f61d7a", default-features = false }
punktfunk-core = { git = "https://git.unom.io/unom/punktfunk", rev = "6e1381e3e976ece0362c734b2b3cf39ffd5537d1", features = ["quic", "chacha-aws-lc-rs", "l10n"] }
pf-client-core = { git = "https://git.unom.io/unom/punktfunk", rev = "6e1381e3e976ece0362c734b2b3cf39ffd5537d1", default-features = false }
# The words the kit and the core show; this client reads the `client` and `console` parts too.
pf-l10n = { git = "https://git.unom.io/unom/punktfunk", rev = "9eb2eb64113b6848e921a7153edd2248b8f61d7a", default-features = false, features = ["client", "console", "host"] }
pf-l10n = { git = "https://git.unom.io/unom/punktfunk", rev = "6e1381e3e976ece0362c734b2b3cf39ffd5537d1", default-features = false, features = ["client", "console", "host"] }

[target.'cfg(target_os = "linux")'.dependencies]
cros-codecs = { git = "https://git.unom.io/unom/punktfunk", rev = "9eb2eb64113b6848e921a7153edd2248b8f61d7a" }
pf-console-ui = { git = "https://git.unom.io/unom/punktfunk", rev = "9eb2eb64113b6848e921a7153edd2248b8f61d7a", default-features = false, features = ["gl"] }
cros-codecs = { git = "https://git.unom.io/unom/punktfunk", rev = "6e1381e3e976ece0362c734b2b3cf39ffd5537d1" }
pf-console-ui = { git = "https://git.unom.io/unom/punktfunk", rev = "6e1381e3e976ece0362c734b2b3cf39ffd5537d1", default-features = false, features = ["gl"] }
sdl3 = { version = "0.20", default-features = false }
# Disable pkg-config: buildroot mangles the SDL prefix outside its sysroot.
# build.rs supplies SDL3_PREFIX for direct linking.
Expand Down
26 changes: 21 additions & 5 deletions src/console/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ impl Service {
game_presets: h.game_presets.clone(),
profile: h.profile.clone(),
running: String::new(),
// No `/display/targets` client: the shell shows no Screen section.
screens: None,
key,
}
}
Expand Down Expand Up @@ -329,18 +331,29 @@ impl Service {
.map_err(|e| crate::core::errors::pair_message(&e))
}),
// The host parks this TV until its operator approves it, held to the advertised
// fingerprint. Never streams.
// fingerprint. The shell offers a request only for a host that has one; a host
// without one pairs by PIN. Never streams.
ConsoleCmd::RequestAccess {
addr,
port,
fp_hex,
device_name,
req,
} => {
let pin = shared::parse_fp(&fp_hex);
let pin = shared::parse_fp(&fp_hex).ok_or(punktfunk_core::PunktfunkError::InvalidArg("fingerprint"));
self.start_pair(addr, port, req, move |addr, port, id| {
NativeClient::request_access(addr, port, (&id.0, &id.1), pin, &device_name, budget::HOST_WAIT, None)
.map_err(|e| crate::core::errors::access_message(&e))
pin.and_then(|pin| {
NativeClient::request_access(
addr,
port,
(&id.0, &id.1),
pin,
&device_name,
budget::HOST_WAIT,
None,
)
})
.map_err(|e| crate::core::errors::access_message(&e))
});
}
ConsoleCmd::SendLogs {
Expand Down Expand Up @@ -432,11 +445,13 @@ impl Service {
// - `EndGame`: no title here is ever `endable` (see `to_model`), so the shell never
// offers it.
// - `Install`: no title here carries `install` (see `to_model`), likewise.
// - `SetScreen`: no row here carries `screens`, so the shell has no Screen section.
ConsoleCmd::RefreshRunning { .. }
| ConsoleCmd::SetClipboard { .. }
| ConsoleCmd::PromptAnswer { .. }
| ConsoleCmd::EndGame { .. }
| ConsoleCmd::Install { .. } => {}
| ConsoleCmd::Install { .. }
| ConsoleCmd::SetScreen { .. } => {}
}
}

Expand Down Expand Up @@ -1333,6 +1348,7 @@ fn discovered_row(d: &DiscoveredHost) -> HostRow {
// Needs `/api/v1/status`, which this client does not ask — the same reason
// `LibraryGame::running` is false here. Empty renders as no line.
running: String::new(),
screens: None,
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/platform/webos/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,11 @@ mod tests {
fn the_ui_language_is_read_from_the_locale_settings() {
let reply = r#"{"returnValue":true,"settings":{"localeInfo":{"locales":{"UI":"de-DE","TV":"en-US"}}}}"#;
assert_eq!(ui_tag(reply).as_deref(), Some("de-DE"));
// webOS writes Chinese with its script, which picks Simplified or Traditional.
for tag in ["ja-JP", "ko-KR", "zh-Hans-CN", "zh-Hant-TW", "zh-Hant-HK"] {
let reply = format!(r#"{{"settings":{{"localeInfo":{{"locales":{{"UI":"{tag}"}}}}}}}}"#);
assert_eq!(ui_tag(&reply).as_deref(), Some(tag));
}
for none in [
r#"{"returnValue":false}"#,
r#"{"settings":{"localeInfo":{"locales":{"UI":""}}}}"#,
Expand Down
1 change: 1 addition & 0 deletions src/runtime/console_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pub(super) fn run(

let opts = ConsoleOptions {
device_name: "webOS TV".into(),
device_code: pf_client_core::trust::device_code(identity),
version: Some(format!(
"{} \u{b7} core {}",
crate::core::VERSION,
Expand Down