Fix issue where client couldn't handle video thumbs

This commit is contained in:
Brett Williams
2023-06-03 13:19:32 -05:00
parent eb8b8d0b90
commit 3a55df788d

View File

@@ -185,7 +185,7 @@ class ZordonClient:
job_id = self.selected_job_id() job_id = self.selected_job_id()
if job_id: if job_id:
# update thumb # update thumb
response = self.server_proxy.request(f'job/{job_id}/thumbnail?size=big') response = self.server_proxy.request(f'job/{job_id}/thumbnail?size=big&video_ok=false')
if response.ok: if response.ok:
try: try:
import io import io
@@ -194,13 +194,13 @@ class ZordonClient:
self.set_image(image) self.set_image(image)
except Exception as e: except Exception as e:
print(f"error getting image: {e}") print(f"error getting image: {e}")
else:
self.set_image(self.default_image)
# update button status # update button status
job = next((d for d in self.job_cache if d.get('id') == job_id), None) job = next((d for d in self.job_cache if d.get('id') == job_id), None)
button_state = 'normal' if job and job['status'] == 'running' else 'disabled' button_state = 'normal' if job and job['status'] == 'running' else 'disabled'
self.stop_button.config(state=button_state) self.stop_button.config(state=button_state)
else:
self.set_image(self.default_image)
def reveal_in_finder(self): def reveal_in_finder(self):
job = next((d for d in self.job_cache if d.get('id') == self.selected_job_id()), None) job = next((d for d in self.job_cache if d.get('id') == self.selected_job_id()), None)