diff --git a/src/api/api_server.py b/src/api/api_server.py index db0cf82..93eede3 100755 --- a/src/api/api_server.py +++ b/src/api/api_server.py @@ -11,6 +11,7 @@ import tempfile import time from datetime import datetime +import cpuinfo import psutil import yaml from flask import Flask, request, send_file, after_this_request, Response, redirect, url_for @@ -230,6 +231,7 @@ def status(): "system_os": current_system_os(), "system_os_version": current_system_os_version(), "system_cpu": current_system_cpu(), + "system_cpu_brand": cpuinfo.get_cpu_info()['brand_raw'], "cpu_percent": psutil.cpu_percent(percpu=False), "cpu_percent_per_cpu": psutil.cpu_percent(percpu=True), "cpu_count": psutil.cpu_count(logical=False), diff --git a/src/init.py b/src/init.py index 2892eba..66a06f6 100644 --- a/src/init.py +++ b/src/init.py @@ -7,6 +7,8 @@ import sys import threading from collections import deque +import cpuinfo + from api.api_server import API_VERSION from src.api.api_server import start_server from src.api.preview_manager import PreviewManager @@ -110,6 +112,7 @@ def run(server_only=False) -> int: # start zeroconf server ZeroconfServer.configure(f"_{APP_NAME.lower()}._tcp.local.", local_hostname, Config.port_number) ZeroconfServer.properties = {'system_cpu': current_system_cpu(), + 'system_cpu_brand': cpuinfo.get_cpu_info()['brand_raw'], 'system_cpu_cores': multiprocessing.cpu_count(), 'system_os': current_system_os(), 'system_os_version': current_system_os_version(), diff --git a/src/ui/main_window.py b/src/ui/main_window.py index 659e70a..b4b91bb 100644 --- a/src/ui/main_window.py +++ b/src/ui/main_window.py @@ -244,7 +244,7 @@ class MainWindow(QMainWindow): # Use the get method with defaults to avoid KeyError os_info = f"OS: {server_info.get('system_os', 'Unknown')} {server_info.get('system_os_version', '')}" - cpu_info = f"CPU: {server_info.get('system_cpu', 'Unknown')} - {server_info.get('system_cpu_cores', 'Unknown')} cores" + cpu_info = f"CPU: {server_info.get('system_cpu_brand', 'Unknown')} ({server_info.get('system_cpu_cores', 'Unknown')} cores)" self.server_info_os.setText(os_info.strip()) self.server_info_cpu.setText(cpu_info)