mirror of
https://github.com/blw1138/Zordon.git
synced 2026-02-05 13:46:10 +00:00
Feature/112 api version (#119)
* Add api_version to status api and server_proxy.py * Add api_version to Zeroconf and filter out incompatible versions when finding available servers * Filter incompatible versions from the UI
This commit is contained in:
@@ -16,6 +16,7 @@ from PyQt6.QtWidgets import QMainWindow, QWidget, QHBoxLayout, QListWidget, QTab
|
||||
QTableWidgetItem, QLabel, QVBoxLayout, QHeaderView, QMessageBox, QGroupBox, QPushButton, QListWidgetItem, \
|
||||
QFileDialog
|
||||
|
||||
from api.api_server import API_VERSION
|
||||
from src.render_queue import RenderQueue
|
||||
from src.utilities.misc_helper import get_time_elapsed, resources_dir, is_localhost
|
||||
from src.utilities.status_utils import RenderStatus
|
||||
@@ -412,6 +413,8 @@ class MainWindow(QMainWindow):
|
||||
|
||||
def update_servers(self):
|
||||
found_servers = list(set(ZeroconfServer.found_hostnames() + self.added_hostnames))
|
||||
found_servers = [x for x in found_servers if ZeroconfServer.get_hostname_properties(x)['api_version'] == API_VERSION]
|
||||
|
||||
# Always make sure local hostname is first
|
||||
if found_servers and not is_localhost(found_servers[0]):
|
||||
for hostname in found_servers:
|
||||
|
||||
Reference in New Issue
Block a user