@danhachuel/thunderbolt 0.5.81 → 0.5.82

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.
Files changed (2) hide show
  1. package/app/main.py +24 -23
  2. package/package.json +1 -1
package/app/main.py CHANGED
@@ -5441,7 +5441,11 @@ def render_automation():
5441
5441
  for channel in channels:
5442
5442
  channel_id = channel["id"]
5443
5443
  with st.container(border=True):
5444
- header_cols = st.columns([0.55, 2.35, 1.35, 1.5, 1.35])
5444
+ blueprint_ids, blueprint_labels, current_blueprint, voice_options, current_voice = channel_default_options(channel)
5445
+ automation_blueprint = current_blueprint
5446
+ automation_voice = current_voice
5447
+ automation_format = str(channel.get("format") or "wide")
5448
+ header_cols = st.columns([0.62, 2.15, 1.55, 1.25, 1.25, 1.45, 1.3], gap="small")
5445
5449
  with header_cols[0]:
5446
5450
  if channel.get("thumbnail_url"):
5447
5451
  st.image(channel["thumbnail_url"], width=48)
@@ -5451,18 +5455,24 @@ def render_automation():
5451
5455
  st.write(f"**{channel.get('name', 'Sem nome')}**")
5452
5456
  st.caption(channel.get("handle") or channel.get("url") or "sem URL")
5453
5457
  with header_cols[2]:
5454
- enabled = st.toggle("Automação ligada", value=bool(channel.get("automation_on", False)), key=f"automation_on_{channel_id}")
5458
+ st.markdown("**Thumbnail Blueprint**")
5459
+ st.caption(str(paired_thumbnail.get("name") or "Generic_Thumbnail_Blueprint"))
5455
5460
  with header_cols[3]:
5456
- schedule_time = st.text_input("Horário (HH:MM)", value=channel.get("automation_time", "00:00"), key=f"automation_time_{channel_id}")
5457
- blueprint_ids, blueprint_labels, current_blueprint, voice_options, current_voice = channel_default_options(channel)
5458
- default_cols = st.columns([1.0, 1.0, 1.35, 1.45, 1.55, 1.0], gap="small")
5459
- with default_cols[0]:
5460
5461
  st.markdown("**Idioma do roteiro**")
5461
5462
  st.caption(video_language_label(normalize_video_language(channel.get("language") or "pt")))
5462
- with default_cols[1]:
5463
+ with header_cols[4]:
5463
5464
  st.markdown("**Nicho Padrão**")
5464
5465
  st.caption(channel_niche_label(channel))
5465
- with default_cols[3]:
5466
+ with header_cols[5]:
5467
+ st.markdown("**Fonte do vídeo**")
5468
+ st.caption(channel_video_source_value(channel.get("style_wide")))
5469
+ st.markdown("**Proporção do vídeo**")
5470
+ st.caption(str(channel.get("video_aspect_ratio") or "Landscape 16:9"))
5471
+ with header_cols[6]:
5472
+ schedule_time = st.text_input("Horário (HH:MM)", value=channel.get("automation_time", "00:00"), key=f"automation_time_{channel_id}")
5473
+
5474
+ control_cols = st.columns([1.8, 1.8, 1.35, 1.2], gap="small")
5475
+ with control_cols[0]:
5466
5476
  automation_blueprint = st.selectbox(
5467
5477
  "Blueprint Padrão",
5468
5478
  blueprint_ids,
@@ -5470,19 +5480,8 @@ def render_automation():
5470
5480
  format_func=lambda item: blueprint_labels.get(item, item or "Sem Blueprint padrão"),
5471
5481
  key=f"automation_blueprint_{channel_id}",
5472
5482
  )
5473
- with default_cols[2]:
5474
- paired_thumbnail = thumbnail_blueprint_for_blueprint(automation_blueprint)
5475
- st.markdown("**Fonte do vídeo**")
5476
- st.caption(channel_video_source_value(channel.get("style_wide")))
5477
- st.markdown("**Proporção do vídeo**")
5478
- st.caption(str(channel.get("video_aspect_ratio") or "Landscape 16:9"))
5479
- st.markdown("**Formato**")
5480
- st.caption(str(channel.get("format") or "wide"))
5481
- st.markdown("**Thumbnail Blueprint**")
5482
- st.caption(str(paired_thumbnail.get("name") or "Generic_Thumbnail_Blueprint"))
5483
- with default_cols[4]:
5484
- automation_format = st.selectbox("Formato", CHANNEL_FORMAT_OPTIONS, index=CHANNEL_FORMAT_OPTIONS.index(str(channel.get("format") or "wide")) if str(channel.get("format") or "wide") in CHANNEL_FORMAT_OPTIONS else 0, key=f"automation_format_{channel_id}")
5485
- with default_cols[5]:
5483
+ paired_thumbnail = thumbnail_blueprint_for_blueprint(automation_blueprint)
5484
+ with control_cols[1]:
5486
5485
  automation_voice = st.selectbox(
5487
5486
  "Narrador/Voz Padrão",
5488
5487
  voice_options,
@@ -5490,8 +5489,10 @@ def render_automation():
5490
5489
  format_func=lambda item: item or "Sem voz padrão",
5491
5490
  key=f"automation_voice_{channel_id}",
5492
5491
  )
5493
- with default_cols[5]:
5494
- if st.button("Guardar", key=f"automation_save_{channel_id}", use_container_width=True):
5492
+ with control_cols[2]:
5493
+ enabled = st.toggle("Automação ligada", value=bool(channel.get("automation_on", False)), key=f"automation_on_{channel_id}")
5494
+ with control_cols[3]:
5495
+ if st.button("Guardar", key=f"automation_save_{channel_id}", use_container_width=True, type="primary"):
5495
5496
  if not valid_hhmm(schedule_time):
5496
5497
  st.error("Use o formato HH:MM, por exemplo 08:30.")
5497
5498
  else:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.5.81",
3
+ "version": "0.5.82",
4
4
  "description": "Thunderbolt — interface local para operação de canais faceless e motor MoneyPrinterTurbo",
5
5
  "license": "MIT",
6
6
  "main": "scripts/cli.mjs",