mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 08:48:13 +00:00
Add logic to download button in main window
This commit is contained in:
@@ -565,7 +565,15 @@ class MainWindow(QMainWindow):
|
|||||||
self.fetch_jobs(clear_table=True)
|
self.fetch_jobs(clear_table=True)
|
||||||
|
|
||||||
def download_files(self, event):
|
def download_files(self, event):
|
||||||
pass
|
|
||||||
|
job_ids = self.selected_job_ids()
|
||||||
|
if not job_ids:
|
||||||
|
return
|
||||||
|
|
||||||
|
import webbrowser
|
||||||
|
download_url = (f"http://{self.current_server_proxy.hostname}:{self.current_server_proxy.port}"
|
||||||
|
f"/api/job/{job_ids[0]}/download_all")
|
||||||
|
webbrowser.open(download_url)
|
||||||
|
|
||||||
def open_files(self, event):
|
def open_files(self, event):
|
||||||
job_ids = self.selected_job_ids()
|
job_ids = self.selected_job_ids()
|
||||||
|
|||||||
Reference in New Issue
Block a user