mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
add http to camera address if not found
This commit is contained in:
parent
65f6aa7181
commit
5ea1a39209
@ -50,6 +50,9 @@ class Camera:
|
|||||||
if (
|
if (
|
||||||
self.config.capture_source != None and self.config.capture_source != ""
|
self.config.capture_source != None and self.config.capture_source != ""
|
||||||
):
|
):
|
||||||
|
# if len(self.current_capture_source) > 2 and "http" not in self.current_capture_source:
|
||||||
|
# self.current_capture_source = f"http://{self.current_capture_source}/"
|
||||||
|
# print(self.current_capture_source)
|
||||||
if (self.current_capture_source[:3] == "COM"):
|
if (self.current_capture_source[:3] == "COM"):
|
||||||
if (
|
if (
|
||||||
self.serial_connection is None
|
self.serial_connection is None
|
||||||
|
|||||||
@ -192,7 +192,10 @@ class CameraWidget:
|
|||||||
if values[self.gui_camera_addr] == "":
|
if values[self.gui_camera_addr] == "":
|
||||||
self.config.capture_source = None
|
self.config.capture_source = None
|
||||||
else:
|
else:
|
||||||
self.config.capture_source = values[self.gui_camera_addr]
|
if len(values[self.gui_camera_addr]) > 5 and "http" not in values[self.gui_camera_addr]: # If http is not in camera address, add it.
|
||||||
|
self.config.capture_source = f"http://{values[self.gui_camera_addr]}/"
|
||||||
|
else:
|
||||||
|
self.config.capture_source = values[self.gui_camera_addr]
|
||||||
changed = True
|
changed = True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user