Server IPC key
Some checks failed
Continuous integration / test (push) Has been cancelled

This commit is contained in:
Vladimir Borisov 2026-02-02 17:21:47 +02:00
parent 07d821012d
commit 15069204be
No known key found for this signature in database
GPG key ID: F9A584BE4FCB6603
4 changed files with 18 additions and 5 deletions

14
Cargo.lock generated
View file

@ -1598,7 +1598,7 @@ dependencies = [
[[package]]
name = "stremio-shell-ng"
version = "5.0.16"
version = "5.0.17"
dependencies = [
"anyhow",
"bitflags 2.4.2",
@ -1621,6 +1621,7 @@ dependencies = [
"sha2",
"url",
"urlencoding",
"uuid",
"webview2",
"webview2-sys",
"whoami",
@ -1964,6 +1965,17 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "uuid"
version = "1.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f"
dependencies = [
"getrandom 0.3.3",
"js-sys",
"wasm-bindgen",
]
[[package]]
name = "vcpkg"
version = "0.2.15"

View file

@ -1,6 +1,6 @@
[package]
name = "stremio-shell-ng"
version = "5.0.16"
version = "5.0.17"
edition = "2018"
[dependencies]

View file

@ -16,6 +16,6 @@ $thread = Start-ThreadJob -InputObject ($pw) -ScriptBlock {
}
cargo build --release --target x86_64-pc-windows-msvc
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DSIGN "/Sstremiosign=`$qC:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86\signtool.exe`$q sign /fd SHA256 /t http://timestamp.digicert.com /n `$qSmart Code OOD`$q `$f" "setup\Stremio.iss"
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DSIGN "/Sstremiosign=`$qsigntool`$q sign /fd SHA256 /t http://timestamp.digicert.com /n `$qSmart Code OOD`$q `$f" "setup\Stremio.iss"
Stop-Job -Job $thread

View file

@ -1,3 +1,4 @@
use crate::stremio_app::constants::SERVER_IPC_KEY;
use crate::stremio_app::ipc;
use native_windows_gui::{self as nwg, PartialUi};
use once_cell::unsync::OnceCell;
@ -15,7 +16,7 @@ use webview2::Controller;
use winapi::shared::windef::HWND;
use winapi::um::winuser::{GetClientRect, VK_F7, WM_SETFOCUS};
use super::constants::{SERVER_IPC_KEY, WARNING_URL, WHITELISTED_HOSTS};
use super::constants::{WARNING_URL, WHITELISTED_HOSTS};
#[derive(Default)]
pub struct WebView {
@ -156,7 +157,7 @@ impl PartialUi for WebView {
wv.execute_script(format!(
"window.stremio_server_ipc_key='{}'",
std::env::var(SERVER_IPC_KEY).unwrap_or_default()
), |_| Ok(())
).as_str(), |_| Ok(())
).expect("Cannot add SERVER_IPC_KEY to webview");
wv.execute_script(r##"