mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
add api server url and fix check if website is up
This commit is contained in:
@@ -21,4 +21,4 @@ def scrape_rutracker(search_text, debug):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# This function utilizes the SoftwareManager server - source code can be found under the "server" branch.
|
# This function utilizes the SoftwareManager server - source code can be found under the "server" branch.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ async def init_uztracker():
|
|||||||
up = True
|
up = True
|
||||||
else:
|
else:
|
||||||
up = False
|
up = False
|
||||||
print(f"Rutracker seems down, status code: {response.status_code}")
|
print(f"Uztracker seems down, status code: {response.status_code}")
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
print(f"\nRequest Exception on {url_uztracker}:")
|
print(f"\nRequest Exception on {url_uztracker}:")
|
||||||
print(e)
|
print(e)
|
||||||
|
|||||||
+11
-4
@@ -14,6 +14,7 @@ from PySide6.QtWidgets import (
|
|||||||
QSpinBox,
|
QSpinBox,
|
||||||
QTabWidget,
|
QTabWidget,
|
||||||
QProgressBar,
|
QProgressBar,
|
||||||
|
QTextEdit,
|
||||||
)
|
)
|
||||||
from PySide6.QtGui import QIcon, QAction
|
from PySide6.QtGui import QIcon, QAction
|
||||||
import darkdetect
|
import darkdetect
|
||||||
@@ -149,7 +150,6 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
dialog.setWindowTitle("Settings")
|
dialog.setWindowTitle("Settings")
|
||||||
dialog.setFixedSize(400, 200)
|
dialog.setFixedSize(400, 200)
|
||||||
|
|
||||||
|
|
||||||
dialog.setLayout(QVBoxLayout())
|
dialog.setLayout(QVBoxLayout())
|
||||||
dialog.layout().addWidget(QLabel("Settings"))
|
dialog.layout().addWidget(QLabel("Settings"))
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
|
|
||||||
# container for tight space
|
# container for tight space
|
||||||
thread_container = QWidget()
|
thread_container = QWidget()
|
||||||
thread_layout = QVBoxLayout()
|
thread_layout = QHBoxLayout()
|
||||||
|
|
||||||
thread_layout.addWidget(QLabel("Threads:"))
|
thread_layout.addWidget(QLabel("Threads:"))
|
||||||
thread_layout.addWidget(thread_box)
|
thread_layout.addWidget(thread_box)
|
||||||
@@ -181,8 +181,16 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
|
|
||||||
dialog.layout().addWidget(thread_container)
|
dialog.layout().addWidget(thread_container)
|
||||||
|
|
||||||
|
# server setting
|
||||||
|
api_url_container = QWidget()
|
||||||
|
api_url_layout = QHBoxLayout()
|
||||||
|
|
||||||
|
text_edit = QTextEdit()
|
||||||
|
api_url_layout.addWidget(QLabel("api server url:"))
|
||||||
|
api_url_layout.addWidget(text_edit)
|
||||||
|
api_url_container.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
|
||||||
|
api_url_container.setLayout(api_url_layout)
|
||||||
|
dialog.layout().addWidget(api_url_container)
|
||||||
|
|
||||||
# dialog.layout().addWidget(QtWidgets.QPushButton("Close", clicked=dialog.close))
|
# dialog.layout().addWidget(QtWidgets.QPushButton("Close", clicked=dialog.close))
|
||||||
|
|
||||||
@@ -191,7 +199,6 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
save_btn = QPushButton("Save")
|
save_btn = QPushButton("Save")
|
||||||
cancel_btn = QPushButton("Cancel")
|
cancel_btn = QPushButton("Cancel")
|
||||||
save_btn.clicked.connect(lambda: self.save_settings(thread_box.value(), close_settings))
|
save_btn.clicked.connect(lambda: self.save_settings(thread_box.value(), close_settings))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cancel_btn.clicked.connect(dialog.reject)
|
cancel_btn.clicked.connect(dialog.reject)
|
||||||
|
|||||||
Reference in New Issue
Block a user