feat: manage saved thumbnail plans and select plans for tasks
This commit is contained in:
@@ -88,6 +88,10 @@ class Scheduler:
|
||||
|
||||
def save_job(self, job, id=None):
|
||||
self.service.registry.get(job.device_id)
|
||||
if job.generate_thumbnail:
|
||||
from pigway_frame_flow.display.thumbnail_plans import get_plan
|
||||
|
||||
get_plan(self.service, job.thumbnail_plan_id)
|
||||
if job.source.type != "restore":
|
||||
self.service.validate(
|
||||
DisplayRequest(device_id=job.device_id, content=job.source),
|
||||
@@ -183,6 +187,8 @@ class Scheduler:
|
||||
restore_previous=job.restore_previous,
|
||||
priority=job.priority,
|
||||
cleanup_unstarred=job.cleanup_unstarred,
|
||||
generate_thumbnail=job.generate_thumbnail,
|
||||
thumbnail_plan_id=job.thumbnail_plan_id,
|
||||
),
|
||||
).model_dump(mode="json")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user