Windows File Path Fixes (#39)

* Added system_safe_path to convert paths to Windows

* Fix issue where engines would not be reported unless a system engine was installed

* Platform independent searching for binaries in engine directory

* Add missing package to requirements.txt

* Better error handling for ffmpeg.get_all_formats()

* Add system_safe_path to more locations in api_server.py

* Fix naming issue with Blender on macos

* Fix path lookups and add engine_path to workers

* Report installed renderers in status

* Remove files included by accident
This commit is contained in:
2023-10-21 20:12:09 -07:00
committed by GitHub
parent 0b6b971fbc
commit 7a52cce40a
16 changed files with 129 additions and 61 deletions

View File

@@ -1,5 +1,6 @@
import logging
import os
import platform
import subprocess
from datetime import datetime
@@ -103,3 +104,9 @@ def get_file_size_human(file_path):
else:
return f"{size_in_bytes / 1024 ** 4:.2f} TB"
# Convert path to the appropriate format for the current platform
def system_safe_path(path):
if platform.system().lower() == "windows":
return os.path.normpath(path)
return path.replace("\\", "/")