mirror of
https://github.com/facefusion/facefusion.git
synced 2026-06-06 20:53:54 +02:00
make the world a better place
This commit is contained in:
@@ -4,6 +4,7 @@ from typing import List, Optional
|
||||
|
||||
import facefusion.choices
|
||||
from facefusion.filesystem import create_directory, get_file_name, is_directory, is_file, move_file, remove_directory, remove_file, resolve_file_pattern
|
||||
from facefusion.sanitizer import sanitize_job_id
|
||||
from facefusion.jobs.job_helper import get_step_output_path
|
||||
from facefusion.json import read_json, write_json
|
||||
from facefusion.time_helper import get_current_date_time
|
||||
@@ -261,5 +262,6 @@ def find_job_path(job_id : str) -> Optional[str]:
|
||||
|
||||
def get_job_file_name(job_id : str) -> Optional[str]:
|
||||
if job_id:
|
||||
job_id = sanitize_job_id(job_id)
|
||||
return job_id + '.json'
|
||||
return None
|
||||
|
||||
@@ -9,6 +9,7 @@ def sanitize_job_id(job_id : str) -> str:
|
||||
|
||||
if __job_id__.isalnum():
|
||||
return job_id
|
||||
|
||||
return hashlib.sha1(job_id.encode()).hexdigest()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user