diff --git a/api/routers/frame.py b/api/routers/frame.py index 4421e1b..e345f87 100644 --- a/api/routers/frame.py +++ b/api/routers/frame.py @@ -56,15 +56,14 @@ async def render_frame( try: logger.info(f"Frame render request: template={request.template}") - # Resolve template path (handles both "default.html" and "1080x1920/default.html") + # Resolve template path (returns absolute path with "templates/" or "data/templates/" prefix) template_path = resolve_template_path(request.template) - full_template_path = f"templates/{template_path}" # Parse template size - width, height = parse_template_size(full_template_path) + width, height = parse_template_size(template_path) # Create HTML frame generator - generator = HTMLFrameGenerator(full_template_path) + generator = HTMLFrameGenerator(template_path) # Generate frame frame_path = await generator.generate_frame( diff --git a/api/routers/resources.py b/api/routers/resources.py index ff91c28..f247874 100644 --- a/api/routers/resources.py +++ b/api/routers/resources.py @@ -100,8 +100,8 @@ async def list_image_workflows(pixelle_video: PixelleVideoDep): ``` """ try: - # Get all workflows from image service - all_workflows = pixelle_video.image.list_workflows() + # Get all workflows from media service (image generation is handled by media service) + all_workflows = pixelle_video.media.list_workflows() # Filter to image workflows only (filename starts with "image_") image_workflows = [ diff --git a/api/schemas/frame.py b/api/schemas/frame.py index f8b2c3c..d4f72d6 100644 --- a/api/schemas/frame.py +++ b/api/schemas/frame.py @@ -26,7 +26,7 @@ class FrameRenderRequest(BaseModel): ) title: Optional[str] = Field(None, description="Frame title (optional)") text: str = Field(..., description="Frame text content") - image: str = Field(..., description="Image path or URL") + image: Optional[str] = Field(None, description="Image path or URL (optional)") class Config: json_schema_extra = {