修复模板索引值传递问题
This commit is contained in:
@@ -200,9 +200,8 @@ class HTMLFrameGenerator:
|
||||
}
|
||||
}
|
||||
"""
|
||||
# Preset parameters that should be ignored
|
||||
PRESET_PARAMS = {'title', 'text', 'image', 'content_title', 'content_author',
|
||||
'content_subtitle', 'content_genre'}
|
||||
# Preset parameters that should be ignored (auto-injected by system)
|
||||
PRESET_PARAMS = {'title', 'text', 'image', 'index'}
|
||||
|
||||
# Pattern: {{param_name:type=default}} or {{param_name=default}} or {{param_name:type}} or {{param_name}}
|
||||
# Param name: must start with letter or underscore, can contain letters, digits, underscores
|
||||
|
||||
@@ -293,15 +293,9 @@ class FrameProcessor:
|
||||
content_metadata = storyboard.content_metadata if storyboard else None
|
||||
|
||||
# Build ext data
|
||||
ext = {}
|
||||
if content_metadata:
|
||||
ext["content_title"] = content_metadata.title or ""
|
||||
ext["content_author"] = content_metadata.author or ""
|
||||
ext["content_subtitle"] = content_metadata.subtitle or ""
|
||||
ext["content_genre"] = content_metadata.genre or ""
|
||||
|
||||
# Add frame index (1-based)
|
||||
ext["index"] = frame.index + 1
|
||||
ext = {
|
||||
"index": frame.index + 1,
|
||||
}
|
||||
|
||||
# Add custom template parameters
|
||||
if config.template_params:
|
||||
|
||||
Reference in New Issue
Block a user