mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Initial commit of index html and add ability to delete jobs
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import glob
|
||||
import hashlib
|
||||
import json
|
||||
import logging
|
||||
@@ -38,7 +39,7 @@ class RenderJob:
|
||||
return hashlib.md5(open(self.worker.input_path, 'rb').read()).hexdigest()
|
||||
return None
|
||||
|
||||
def json_safe_copy(self):
|
||||
def json(self):
|
||||
"""Converts RenderJob into JSON-friendly dict"""
|
||||
import numbers
|
||||
job_dict = None
|
||||
@@ -97,6 +98,13 @@ class RenderJob:
|
||||
def frame_count(self):
|
||||
return self.worker.total_frames
|
||||
|
||||
def file_list(self):
|
||||
job_dir = os.path.dirname(self.worker.output_path)
|
||||
return glob.glob(os.path.join(job_dir, '*'))
|
||||
|
||||
def log_path(self):
|
||||
return self.worker.log_path
|
||||
|
||||
@classmethod
|
||||
def generate_id(cls):
|
||||
return str(uuid.uuid4()).split('-')[0]
|
||||
Reference in New Issue
Block a user