@danhachuel/thunderbolt 0.6.76 → 0.6.77

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 +7 -6
  2. package/package.json +1 -1
package/app/main.py CHANGED
@@ -4970,10 +4970,11 @@ def _task_artifact_path(task: dict[str, Any], *names: str) -> Path | None:
4970
4970
 
4971
4971
 
4972
4972
  def _download_title(task: dict[str, Any]) -> str:
4973
- """Return a filesystem-safe title for automation downloads."""
4974
- raw_title = str(task.get("title") or task.get("topic") or task.get("name") or "Vídeo").strip()
4975
- cleaned = re.sub(r'[<>:"/\\|?*\\x00-\\x1f]+', "_", raw_title)
4976
- cleaned = " ".join(cleaned.split()).strip(" ._")
4973
+ """Return the original video name, safely normalised for downloaded files."""
4974
+ raw_title = str(task.get("topic") or task.get("title") or task.get("name") or "Vídeo").strip()
4975
+ cleaned = re.sub(r'[<>:"/\\|?*\x00-\x1f]+', "_", raw_title)
4976
+ cleaned = re.sub(r"\s+", "_", cleaned)
4977
+ cleaned = re.sub(r"_+", "_", cleaned).strip(" ._")
4977
4978
  return cleaned or "Vídeo"
4978
4979
 
4979
4980
 
@@ -5713,7 +5714,7 @@ def _render_youtube_automation_cards():
5713
5714
  st.download_button(
5714
5715
  "Baixar Thumbnail",
5715
5716
  data=thumbnail_path.read_bytes() if thumbnail_path else b"",
5716
- file_name=_automation_download_name("Thumbnail9:16", task, thumbnail_path, ".png"),
5717
+ file_name=_automation_download_name("Thumbnail", task, thumbnail_path, ".png"),
5717
5718
  mime="image/png",
5718
5719
  key=f"automation_download_thumbnail_{task['id']}",
5719
5720
  use_container_width=True,
@@ -5761,7 +5762,7 @@ def _render_youtube_automation_cards():
5761
5762
  st.download_button(
5762
5763
  "Baixar Vídeo",
5763
5764
  data=video_path.read_bytes() if video_path else b"",
5764
- file_name=_automation_download_name("Vídeo9:16", task, video_path, ".mp4"),
5765
+ file_name=_automation_download_name("Vídeo", task, video_path, ".mp4"),
5765
5766
  mime="video/mp4",
5766
5767
  key=f"automation_download_video_{task['id']}",
5767
5768
  use_container_width=True,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.6.76",
3
+ "version": "0.6.77",
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",