mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-02-01 07:39:10 +00:00
fix: don't fail when posix env var is not present (#1018)
* fix: don't set MacOS specific values when not on MacOS * refactor: use dict.get instead
This commit is contained in:
@@ -16,7 +16,7 @@ from tagstudio.qt.helpers.silent_popen import silent_Popen, silent_run
|
||||
|
||||
logger = structlog.get_logger(__name__)
|
||||
|
||||
user = os.environ["USER"]
|
||||
user = os.environ.get("USER", None)
|
||||
FFMPEG_MACOS_LOCATIONS: list[str] = [
|
||||
"",
|
||||
"/opt/homebrew/bin/",
|
||||
@@ -65,7 +65,7 @@ def probe(filename, cmd=FFPROBE_CMD, timeout=None, **kwargs):
|
||||
``stderr`` property of the exception.
|
||||
"""
|
||||
args = [cmd, "-show_format", "-show_streams", "-of", "json"]
|
||||
args += ffmpeg._utils.convert_kwargs_to_cmd_line_args(kwargs)
|
||||
args += ffmpeg._utils.convert_kwargs_to_cmd_line_args(kwargs) # pyright: ignore[reportAttributeAccessIssue]
|
||||
args += [filename]
|
||||
|
||||
# PATCHED
|
||||
|
||||
Reference in New Issue
Block a user