From 723d325037485f845e43bc75cef516c1f43f671d Mon Sep 17 00:00:00 2001 From: RumovZ Date: Sat, 8 Aug 2026 14:19:26 +0200 Subject: [PATCH] Use env cleaner in previewer and ffmpeg version query --- CHANGELOG.md | 4 ++++ src/usdb_syncer/utils.py | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5896393c..6a5ee99e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ # Changes +## Fixes + +- Fix issues with ffmpeg in the Linux bundle if querying the version or using the previewer. + ## Features - Webserver settings are now saved and the webserver may be automatically started on app launch. It also got an improved API that makes it easy for external apps to interact with the Syncer (like [this mod for Melody Mania](https://steamcommunity.com/sharedfiles/filedetails/?id=3181930801)). diff --git a/src/usdb_syncer/utils.py b/src/usdb_syncer/utils.py index beb0cf4f..a96f5975 100644 --- a/src/usdb_syncer/utils.py +++ b/src/usdb_syncer/utils.py @@ -380,6 +380,7 @@ def get_media_duration(path: Path) -> float: stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True, + env=subprocessing.get_env_clean(), ) return float(result.stdout) @@ -401,7 +402,11 @@ def get_ffmpeg_version() -> str | None: return None result = subprocess.run( - ["ffmpeg", "-version"], capture_output=True, text=True, check=False + ["ffmpeg", "-version"], + capture_output=True, + text=True, + check=False, + env=subprocessing.get_env_clean(), ) output = result.stdout or result.stderr