Skip to content

Commit 203839d

Browse files
committed
Merge branch 'master' into release
2 parents a791e66 + dcdf99b commit 203839d

10 files changed

Lines changed: 76 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.21.1] - 2026-02-08
11+
12+
### Fixed
13+
14+
- **Windows ML Upscaling Paths:** Normalized extended-length Windows paths (`\\?\...`) before passing frame and model directories to the Real-ESRGAN sidecar, fixing `_wfopen ... failed` errors during upscaling.
15+
1016
## [0.21.0] - 2026-02-08
1117

1218
### Fixed
@@ -495,7 +501,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
495501
- Automatic media metadata probing via FFprobe.
496502
- Preset-based configuration system.
497503

498-
[Unreleased]: https://github.com/66HEX/frame/compare/0.21.0...HEAD
504+
[Unreleased]: https://github.com/66HEX/frame/compare/0.21.1...HEAD
505+
[0.21.1]: https://github.com/66HEX/frame/compare/0.21.0...0.21.1
499506
[0.21.0]: https://github.com/66HEX/frame/compare/0.20.0...0.21.0
500507
[0.20.0]: https://github.com/66HEX/frame/compare/0.19.0...0.20.0
501508
[0.19.0]: https://github.com/66HEX/frame/compare/0.18.1...0.19.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "frame",
3-
"version": "0.21.0",
3+
"version": "0.21.1",
44
"private": true,
55
"type": "module",
66
"scripts": {

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "frame"
3-
version = "0.21.0"
3+
version = "0.21.1"
44
description = "A simple FFmpeg GUI"
55
edition = "2024"
66
authors = ["Marek Jóźwiak <hexthecoder@gmail.com>"]

src-tauri/src/conversion/tests.rs

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,11 @@ mod parsing_tests {
467467

468468
#[cfg(test)]
469469
mod utils_tests {
470+
use std::path::Path;
471+
470472
use crate::conversion::utils::{
471473
is_audio_only_container, is_nvenc_codec, is_videotoolbox_codec, map_nvenc_preset,
472-
parse_frame_rate_string, parse_probe_bitrate,
474+
parse_frame_rate_string, parse_probe_bitrate, sanitize_external_tool_path,
473475
};
474476

475477
#[test]
@@ -567,6 +569,33 @@ mod utils_tests {
567569
assert_eq!(map_nvenc_preset("p7"), "p7");
568570
assert_eq!(map_nvenc_preset("unknown"), "medium");
569571
}
572+
573+
#[test]
574+
fn sanitize_external_tool_path_compatible_format() {
575+
#[cfg(windows)]
576+
{
577+
assert_eq!(
578+
sanitize_external_tool_path(Path::new(r"\\?\C:\Users\Karolina\models")),
579+
r"C:\Users\Karolina\models"
580+
);
581+
assert_eq!(
582+
sanitize_external_tool_path(Path::new(r"\\?\UNC\server\share\models")),
583+
r"\\server\share\models"
584+
);
585+
assert_eq!(
586+
sanitize_external_tool_path(Path::new(r"C:\Users\Karolina\models")),
587+
r"C:\Users\Karolina\models"
588+
);
589+
}
590+
591+
#[cfg(not(windows))]
592+
{
593+
assert_eq!(
594+
sanitize_external_tool_path(Path::new("/tmp/frame/models")),
595+
"/tmp/frame/models"
596+
);
597+
}
598+
}
570599
}
571600

572601
#[cfg(test)]

src-tauri/src/conversion/upscale.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::conversion::manager::ManagerMessage;
1414
use crate::conversion::types::{
1515
CompletedPayload, ConversionTask, LogPayload, MetadataMode, ProgressPayload, StartedPayload,
1616
};
17-
use crate::conversion::utils::{FRAME_REGEX, parse_time};
17+
use crate::conversion::utils::{FRAME_REGEX, parse_time, sanitize_external_tool_path};
1818

1919
pub async fn run_upscale_worker(
2020
app: AppHandle,
@@ -232,15 +232,15 @@ pub async fn run_upscale_worker(
232232
let upscaler_args = vec![
233233
"-v".to_string(),
234234
"-i".to_string(),
235-
input_frames_dir.to_string_lossy().to_string(),
235+
sanitize_external_tool_path(&input_frames_dir),
236236
"-o".to_string(),
237-
output_frames_dir.to_string_lossy().to_string(),
237+
sanitize_external_tool_path(&output_frames_dir),
238238
"-s".to_string(),
239239
scale.to_string(),
240240
"-f".to_string(),
241241
"png".to_string(),
242242
"-m".to_string(),
243-
models_path.to_string_lossy().to_string(),
243+
sanitize_external_tool_path(&models_path),
244244
"-n".to_string(),
245245
model_name.to_string(),
246246
"-j".to_string(),

src-tauri/src/conversion/utils.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use once_cell::sync::Lazy;
22
use regex::Regex;
3+
use std::path::Path;
34

45
pub static FRAME_REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"frame=\s*(\d+)").unwrap());
56

@@ -98,3 +99,21 @@ pub fn get_hwaccel_args(video_codec: &str) -> Vec<String> {
9899
vec![]
99100
}
100101
}
102+
103+
pub fn sanitize_external_tool_path(path: &Path) -> String {
104+
#[cfg(windows)]
105+
{
106+
let raw = path.to_string_lossy();
107+
if let Some(stripped_unc) = raw.strip_prefix(r"\\?\UNC\") {
108+
return format!(r"\\{}", stripped_unc);
109+
}
110+
if let Some(stripped) = raw.strip_prefix(r"\\?\") {
111+
return stripped.to_string();
112+
}
113+
raw.into_owned()
114+
}
115+
#[cfg(not(windows))]
116+
{
117+
path.to_string_lossy().into_owned()
118+
}
119+
}

src-tauri/src/dialog.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,14 @@ pub async fn ask_native_dialog<R: Runtime>(
227227
#[cfg(target_os = "macos")]
228228
fn prepare_dialog_host<R: Runtime>(window: &Window<R>) -> Option<WebviewWindow<R>> {
229229
let app_handle = window.app_handle();
230-
app_handle.get_webview_window("dialog-host")
230+
let dialog_host = app_handle.get_webview_window("dialog-host");
231+
232+
if let Some(host) = dialog_host.as_ref() {
233+
let _ = host.set_shadow(false);
234+
let _ = host.set_size(tauri::Size::Physical(tauri::PhysicalSize::new(1, 1)));
235+
}
236+
237+
dialog_host
231238
}
232239

233240
#[cfg(target_os = "macos")]

src-tauri/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ pub fn run() {
9696

9797
#[cfg(target_os = "macos")]
9898
{
99-
use tauri::LogicalSize;
100-
10199
let dialog_host = WebviewWindowBuilder::new(
102100
app,
103101
"dialog-host",
@@ -112,11 +110,13 @@ pub fn run() {
112110
.parent(&window)
113111
.expect("Failed to set parent window")
114112
.transparent(true)
113+
.background_color(Color(0, 0, 0, 0))
115114
.skip_taskbar(true)
115+
.shadow(false)
116116
.build()
117117
.unwrap();
118118

119-
let _ = dialog_host.set_size(LogicalSize::new(1.0, 1.0));
119+
let _ = dialog_host.hide();
120120
}
121121

122122
app.manage(conversion::ConversionManager::new(app.handle().clone()));

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "Frame",
4-
"version": "0.21.0",
4+
"version": "0.21.1",
55
"identifier": "Frame",
66
"build": {
77
"beforeDevCommand": "node scripts/run.cjs dev",

0 commit comments

Comments
 (0)