mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
remove leftover aria2 code
This commit is contained in:
@@ -60,31 +60,6 @@ def settings_dialog(self):
|
|||||||
autoresume_layout.addWidget(autoresume_checkbox)
|
autoresume_layout.addWidget(autoresume_checkbox)
|
||||||
dialog.layout().addWidget(autoresume_container)
|
dialog.layout().addWidget(autoresume_container)
|
||||||
|
|
||||||
#####################
|
|
||||||
# DOWNLOAD SETTINGS #
|
|
||||||
#####################
|
|
||||||
thread_box = QSpinBox()
|
|
||||||
thread_box.setMinimum(1)
|
|
||||||
thread_box.setMaximum(16)
|
|
||||||
thread_box.setValue(state.aria2_threads)
|
|
||||||
|
|
||||||
|
|
||||||
# container for tight space
|
|
||||||
thread_container = QWidget()
|
|
||||||
thread_layout = QHBoxLayout()
|
|
||||||
|
|
||||||
thread_layout.addWidget(QLabel("Threads:"))
|
|
||||||
thread_layout.addWidget(thread_box)
|
|
||||||
thread_container.setLayout(thread_layout)
|
|
||||||
thread_container.setMaximumHeight(80)
|
|
||||||
|
|
||||||
|
|
||||||
# Dimensions
|
|
||||||
thread_box.setFixedWidth(90)
|
|
||||||
thread_box.setFixedHeight(30)
|
|
||||||
|
|
||||||
dialog.layout().addWidget(thread_container)
|
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# SERVER SETTING #
|
# SERVER SETTING #
|
||||||
##################
|
##################
|
||||||
@@ -124,6 +99,30 @@ def settings_dialog(self):
|
|||||||
download_path_layout.addWidget(browse_button)
|
download_path_layout.addWidget(browse_button)
|
||||||
browse_button.clicked.connect(browse_download_path)
|
browse_button.clicked.connect(browse_download_path)
|
||||||
|
|
||||||
|
###############
|
||||||
|
# IMAGE PATH #
|
||||||
|
###############
|
||||||
|
|
||||||
|
image_path_container = QWidget()
|
||||||
|
image_path_layout = QHBoxLayout()
|
||||||
|
|
||||||
|
image_path = QLineEdit()
|
||||||
|
image_path_layout.addWidget(QLabel("Image Path (requires restart):"))
|
||||||
|
image_path_layout.addWidget(image_path)
|
||||||
|
image_path_container.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
|
||||||
|
image_path_container.setLayout(image_path_layout)
|
||||||
|
image_path.setText(state.image_path)
|
||||||
|
dialog.layout().addWidget(image_path_container)
|
||||||
|
|
||||||
|
def browse_image_path():
|
||||||
|
file_path = QFileDialog.getOpenFileName(dialog, "Select Image File", state.image_path, "Image Files (*.png *.jpg)")[0]
|
||||||
|
if file_path:
|
||||||
|
image_path.setText(file_path)
|
||||||
|
|
||||||
|
browse_button = QPushButton("📁")
|
||||||
|
image_path_layout.addWidget(browse_button)
|
||||||
|
browse_button.clicked.connect(browse_image_path)
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# SPEED LIMITING #
|
# SPEED LIMITING #
|
||||||
##################
|
##################
|
||||||
@@ -192,31 +191,6 @@ def settings_dialog(self):
|
|||||||
max_downloads.setFixedHeight(30)
|
max_downloads.setFixedHeight(30)
|
||||||
dialog.layout().addWidget(max_downloads_container)
|
dialog.layout().addWidget(max_downloads_container)
|
||||||
|
|
||||||
|
|
||||||
###############
|
|
||||||
# IMAGE PATH #
|
|
||||||
###############
|
|
||||||
|
|
||||||
image_path_container = QWidget()
|
|
||||||
image_path_layout = QHBoxLayout()
|
|
||||||
|
|
||||||
image_path = QLineEdit()
|
|
||||||
image_path_layout.addWidget(QLabel("Image Path (requires restart):"))
|
|
||||||
image_path_layout.addWidget(image_path)
|
|
||||||
image_path_container.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
|
|
||||||
image_path_container.setLayout(image_path_layout)
|
|
||||||
image_path.setText(state.image_path)
|
|
||||||
dialog.layout().addWidget(image_path_container)
|
|
||||||
|
|
||||||
def browse_image_path():
|
|
||||||
file_path = QFileDialog.getOpenFileName(dialog, "Select Image File", state.image_path, "Image Files (*.png *.jpg)")[0]
|
|
||||||
if file_path:
|
|
||||||
image_path.setText(file_path)
|
|
||||||
|
|
||||||
browse_button = QPushButton("📁")
|
|
||||||
image_path_layout.addWidget(browse_button)
|
|
||||||
browse_button.clicked.connect(browse_image_path)
|
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# SAVE/CANCEL #
|
# SAVE/CANCEL #
|
||||||
###############
|
###############
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ class AppState(QObject):
|
|||||||
self.down_speed_limit: int = 0
|
self.down_speed_limit: int = 0
|
||||||
self.max_connections: int = 200
|
self.max_connections: int = 200
|
||||||
self.max_downloads: int = 10
|
self.max_downloads: int = 10
|
||||||
self.aria2process: Optional[Any] = None
|
|
||||||
self.aria2: Any = None
|
|
||||||
self.aria2p: Any = None
|
|
||||||
self.aria2_threads: int = 4
|
|
||||||
self.settings_path: str = None
|
self.settings_path: str = None
|
||||||
self.dl_session: Any = None
|
self.dl_session: Any = None
|
||||||
self.active_downloads: List[str] = {}
|
self.active_downloads: List[str] = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user