diff --git a/Cargo.lock b/Cargo.lock index eb6c6a7..ec32d99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" diff --git a/Cargo.toml b/Cargo.toml index 465217b..f87acba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stremio-shell-ng" -version = "5.0.16" +version = "5.0.17" edition = "2018" [dependencies] diff --git a/build.ps1 b/build.ps1 index e7056c3..c66b00b 100644 --- a/build.ps1 +++ b/build.ps1 @@ -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 diff --git a/src/stremio_app/stremio_wevbiew/wevbiew.rs b/src/stremio_app/stremio_wevbiew/wevbiew.rs index a1063e9..07ff660 100644 --- a/src/stremio_app/stremio_wevbiew/wevbiew.rs +++ b/src/stremio_app/stremio_wevbiew/wevbiew.rs @@ -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##"