diff --git a/package-lock.json b/package-lock.json index 264011630..9a6f1f69e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "world-monitor", - "version": "2.5.8", + "version": "2.5.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "world-monitor", - "version": "2.5.8", + "version": "2.5.12", "license": "AGPL-3.0-only", "dependencies": { "@deck.gl/aggregation-layers": "^9.2.6", diff --git a/package.json b/package.json index 9fb29e273..a705fc2a9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "world-monitor", "private": true, - "version": "2.5.11", + "version": "2.5.12", "license": "AGPL-3.0-only", "type": "module", "scripts": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 3a5066a70..5ae257899 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -5423,7 +5423,7 @@ dependencies = [ [[package]] name = "world-monitor" -version = "2.5.11" +version = "2.5.12" dependencies = [ "getrandom 0.2.17", "keyring", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 0c651698f..fb053901e 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "world-monitor" -version = "2.5.11" +version = "2.5.12" description = "World Monitor desktop application" authors = ["World Monitor"] edition = "2021" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 6d51fcd23..15b804ba9 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1178,6 +1178,37 @@ fn main() { if env::var_os("GTK_IM_MODULE").is_none() { unsafe { env::set_var("GTK_IM_MODULE", "gtk-im-context-simple") }; } + + // The linuxdeploy GStreamer hook force-overrides GST_PLUGIN_SYSTEM_PATH_1_0 + // and GST_PLUGIN_PATH_1_0 to only contain bundled plugins. The AppImage + // bundles GStreamer from the CI build system (Ubuntu 24.04, GStreamer 1.24) + // but does NOT bundle codec plugins (gst-libav, fakevideosink from + // gst-plugins-bad). On hosts with newer GStreamer (e.g. Arch with 1.28), + // the bundled-only path means host plugins are invisible → WebKit can't + // play video. Append host plugin directories as fallback so the system's + // codec plugins are discoverable. + let host_gst_dirs = [ + "/usr/lib/x86_64-linux-gnu/gstreamer-1.0", + "/usr/lib/gstreamer-1.0", + "/usr/lib64/gstreamer-1.0", + "/usr/lib/aarch64-linux-gnu/gstreamer-1.0", + ]; + let existing: Vec = host_gst_dirs + .iter() + .filter(|d| std::path::Path::new(d).is_dir()) + .map(|d| d.to_string()) + .collect(); + if !existing.is_empty() { + let suffix = existing.join(":"); + for var in ["GST_PLUGIN_PATH_1_0", "GST_PLUGIN_SYSTEM_PATH_1_0"] { + let current = env::var(var).unwrap_or_default(); + if !current.is_empty() { + unsafe { env::set_var(var, format!("{current}:{suffix}")) }; + } else { + unsafe { env::set_var(var, &suffix) }; + } + } + } } } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 1f161e7b5..a7ccb38bf 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -2,13 +2,13 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "World Monitor", "mainBinaryName": "world-monitor", - "version": "2.5.11", + "version": "2.5.12", "identifier": "app.worldmonitor.desktop", "build": { "beforeDevCommand": "npm run build:sidecar-sebuf && npm run dev", "beforeBuildCommand": "npm run build:desktop", "frontendDist": "../dist", - "devUrl": "http://localhost:5173" + "devUrl": "http://localhost:3000" }, "app": { "windows": [ diff --git a/src/live-channels-window.ts b/src/live-channels-window.ts index dfc940fc7..a16b9b207 100644 --- a/src/live-channels-window.ts +++ b/src/live-channels-window.ts @@ -403,16 +403,19 @@ export function initLiveChannelsWindow(containerEl?: HTMLElement): void { try { const baseUrl = isDesktopRuntime() ? getRemoteApiBaseUrl() : ''; const res = await fetch(`${baseUrl}/api/youtube/live?channel=${encodeURIComponent(handle)}`); - const data = await res.json(); - if (!data.channelExists) { - if (handleInput) { - handleInput.classList.add('invalid'); - handleInput.setAttribute('title', t('components.liveNews.channelNotFound') ?? 'YouTube channel not found'); + if (res.ok) { + const data = await res.json(); + if (data.channelExists === false && !data.error) { + if (handleInput) { + handleInput.classList.add('invalid'); + handleInput.setAttribute('title', t('components.liveNews.channelNotFound') ?? 'YouTube channel not found'); + } + return; } - return; } + // Non-OK status (429, 5xx) or ambiguous response — allow adding anyway } catch (e) { - // Network error — allow adding anyway (offline tolerance) + // Network/parse error — allow adding anyway (offline tolerance) console.warn('[LiveChannels] YouTube validation failed, allowing add:', e); } finally { if (addBtn) {