feat: initialize network interface state and log interface details

This commit is contained in:
Vxrtrauter
2026-02-05 19:15:39 +01:00
parent 3f39e67933
commit 4589322f0a
4 changed files with 10 additions and 2 deletions
+4
View File
@@ -1,4 +1,5 @@
from core.utils.general.logs import consoleLog
from core.utils.data.state import state
import psutil
addrs = psutil.net_if_addrs()
@@ -38,3 +39,6 @@ def list_interfaces() -> None:
status = "INACTIVE"
consoleLog(f"Found Interface: {interface} [{status}]")
def init_interfaces():
state.interfaces = list(addrs.keys())
state.active_interfaces = get_active_interfaces()
+2
View File
@@ -27,6 +27,8 @@ class AppState(QObject):
self.dl_session: Any = None
self.active_downloads: List[str] = {}
self.window_transparency: bool = False
self.interfaces: List = []
self.active_interfaces: List = []
@property
def image_path(self) -> str: