@danhachuel/thunderbolt 0.5.32 → 0.5.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/main.py +20 -4
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -656,6 +656,19 @@ def render_channel_thumbnail_blueprint_panel(channel: dict, *, compact: bool = F
|
|
|
656
656
|
st.info(f"**Thumbnail Blueprint utilizado pelo canal:** {name} · apenas leitura")
|
|
657
657
|
|
|
658
658
|
|
|
659
|
+
def render_tiktok_prompt_master_panel(channel: dict, *, compact: bool = False) -> None:
|
|
660
|
+
"""Mostrar a configuração editorial TikTok sem exigir um Blueprint YouTube."""
|
|
661
|
+
prompt_id = str(channel.get("default_prompt_master") or channel.get("prompt_master") or "").strip()
|
|
662
|
+
_prompt_ids, prompt_labels = _tiktok_prompt_options()
|
|
663
|
+
prompt_name = prompt_labels.get(prompt_id, prompt_id)
|
|
664
|
+
if not prompt_id:
|
|
665
|
+
st.warning("**SEM PROMPT MASTER CONFIGURADO** · configure um Prompt Master padrão na aba Canais Tiktok.")
|
|
666
|
+
elif compact:
|
|
667
|
+
st.caption(f"**Prompt Master TikTok:** {prompt_name}")
|
|
668
|
+
else:
|
|
669
|
+
st.info(f"**Prompt Master utilizado pelo canal TikTok:** {prompt_name} · `{prompt_id}`")
|
|
670
|
+
|
|
671
|
+
|
|
659
672
|
def creative_payload_from_result(channel: dict, topic: str, creative: dict, topic_source: str = "manual") -> dict[str, Any]:
|
|
660
673
|
variant = creative.get("thumbnail_variant") or {}
|
|
661
674
|
return {
|
|
@@ -3039,9 +3052,12 @@ def render_new_video(page_title: str = "Criação de Vídeos", prefix: str = "ne
|
|
|
3039
3052
|
else:
|
|
3040
3053
|
selected_one = st.selectbox("Canal", active_channels, format_func=lambda c: c["name"], key=f"{prefix}_channel")
|
|
3041
3054
|
selected = [selected_one["id"]]
|
|
3042
|
-
#
|
|
3043
|
-
|
|
3044
|
-
|
|
3055
|
+
# YouTube uses Blueprints; TikTok Shorts use the channel Prompt Master.
|
|
3056
|
+
if channel_platform == "tiktok":
|
|
3057
|
+
render_tiktok_prompt_master_panel(selected_one)
|
|
3058
|
+
else:
|
|
3059
|
+
render_channel_blueprint_panel(selected_one)
|
|
3060
|
+
render_channel_thumbnail_blueprint_panel(selected_one)
|
|
3045
3061
|
generation_settings = render_video_generation_settings(
|
|
3046
3062
|
prefix,
|
|
3047
3063
|
current_language=str(st.session_state.get("video_language") or ""),
|
|
@@ -8625,7 +8641,7 @@ def main():
|
|
|
8625
8641
|
"Início": render_dashboard,
|
|
8626
8642
|
"Pipeline Vídeos": render_pipeline,
|
|
8627
8643
|
"Criação de Vídeos": render_new_video,
|
|
8628
|
-
"Criação de Shorts": lambda: render_new_video("Criação de Shorts", "new_shorts", channel_platform="
|
|
8644
|
+
"Criação de Shorts": lambda: render_new_video("Criação de Shorts", "new_shorts", channel_platform="youtube", fixed_aspect_ratio="Portrait 9:16"),
|
|
8629
8645
|
"Backlog Vídeos": render_videos,
|
|
8630
8646
|
"Criação de Músicas": render_music_creation,
|
|
8631
8647
|
"Music Backlog": render_music_backlog,
|
package/package.json
CHANGED