allow videos to be played (if they have .mp4 in the name)

This commit is contained in:
Prohurtz 2023-03-19 18:34:45 -05:00
parent c90517b6c0
commit 2293f74bfb

View File

@ -192,7 +192,7 @@ class CameraWidget:
if values[self.gui_camera_addr] == "":
self.config.capture_source = None
else:
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.
if len(values[self.gui_camera_addr]) > 5 and "http" not in values[self.gui_camera_addr] and ".mp4" 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]