mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Make log / file opening work on linux / windows
This commit is contained in:
@@ -10,9 +10,8 @@ from tkinter import ttk, messagebox
|
||||
from PIL import Image, ImageTk
|
||||
from lib.client.new_job_window import NewJobWindow
|
||||
from lib.server.server_proxy import RenderServerProxy
|
||||
|
||||
sys.path.append("../")
|
||||
from lib.server.zeroconf_server import ZeroconfServer
|
||||
from lib.utilities.misc_helper import launch_url
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
@@ -210,11 +209,11 @@ class DashboardWindow:
|
||||
def reveal_in_finder(self):
|
||||
job = next((d for d in self.job_cache if d.get('id') == self.selected_job_id()), None)
|
||||
output_dir = os.path.dirname(job['output_path'])
|
||||
subprocess.run(['open', output_dir])
|
||||
launch_url(output_dir)
|
||||
|
||||
def open_logs(self):
|
||||
url = f'http://{self.server_proxy.hostname}:{self.server_proxy.port}/api/job/{self.selected_job_id()}/logs'
|
||||
subprocess.run(['open', url])
|
||||
launch_url(url)
|
||||
|
||||
def mainloop(self):
|
||||
self.root.mainloop()
|
||||
|
||||
Reference in New Issue
Block a user