From 72287ce89ee0a6ba1c90f764e21dae5b85cf3ff3 Mon Sep 17 00:00:00 2001
From: Alex Berezhkovsky <sasna12345@yandex.ru>
Date: Sun, 18 Aug 2024 18:33:46 +0500
Subject: [PATCH] add elif for pygrabber import

---
 modules/ui.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/ui.py b/modules/ui.py
index 47ecf9b..5152190 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -6,7 +6,6 @@ from typing import Callable, Tuple, List, Any
 from types import ModuleType
 import cv2
 from PIL import Image, ImageOps
-from pygrabber.dshow_graph import FilterGraph
 import pyvirtualcam
 
 # Import OS-specific modules only when necessary
@@ -14,6 +13,8 @@ if platform.system() == 'Darwin':  # macOS
     import objc
     from Foundation import NSObject
     import AVFoundation
+elif platform.system() == 'Windows' or platform.system() == 'Linux':
+    from pygrabber.dshow_graph import FilterGraph
 
 import modules.globals
 import modules.metadata