Skip to content

Commit eee779a

Browse files
author
nix
committed
no program crash on error
1 parent 1408e7b commit eee779a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

funscript_editor/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/env python3
22

33
import os
4+
import platform
45
import argparse
56

67
from funscript_editor.api import show_editor, generate_funscript
@@ -22,7 +23,7 @@ def main():
2223
if os.getcwd() not in os.environ['PATH']:
2324
os.environ['PATH'] = os.getcwd() + os.sep + os.environ['PATH']
2425

25-
if os.path.abspath(__file__).startswith("/nix"):
26+
if platform.system().lower().startswith("linux") or os.path.abspath(__file__).startswith("/nix"):
2627
# pynput does not work well with native wayland so we use xwayland to get proper keyboard inputs
2728
if os.environ.get('DISPLAY'):
2829
print("Warning: Force QT_QPA_PLATFORM=xcb for better user experience")

funscript_editor/algorithms/trackingmanager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def __init__(self,
8686
self.params = params
8787
self.video_info = video_info
8888
self.tracking_points = {}
89+
self.projection_config = {'name': 'None', 'video_filter': ''}
8990
self.score = {
9091
'x': [],
9192
'y': [],
@@ -513,6 +514,7 @@ def tracking(self) -> str:
513514
return "Could not extract first frame, please re-encode your video"
514515

515516
self.projection_config = self.ui.get_video_projection_config(first_frame, self.params.projection)
517+
print("Use projection config:", self.projection_config)
516518

517519
video = FFmpegStream(
518520
video_path = self.params.video_path,

0 commit comments

Comments
 (0)