@danhachuel/thunderbolt 0.4.37 → 0.4.39
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 +31 -8
- package/hermes_ui/media_generation.py +1 -1
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -2086,15 +2086,29 @@ def render_channels():
|
|
|
2086
2086
|
if not registered_channels:
|
|
2087
2087
|
st.info("Nenhum canal cadastrado.")
|
|
2088
2088
|
else:
|
|
2089
|
+
wide_style_labels = {
|
|
2090
|
+
"pexels": "Pexels/Pixabay",
|
|
2091
|
+
"full_ia": "Full IA",
|
|
2092
|
+
"music": "Apenas Música",
|
|
2093
|
+
}
|
|
2089
2094
|
registered_rows = [
|
|
2090
2095
|
{
|
|
2091
|
-
"
|
|
2092
|
-
"
|
|
2093
|
-
"
|
|
2096
|
+
"URL canal": str(channel.get("url") or ""),
|
|
2097
|
+
"Nome canal": str(channel.get("name") or ""),
|
|
2098
|
+
"Handle canal": str(channel.get("handle") or ""),
|
|
2099
|
+
"Narrador/ voz padrão": str(channel.get("default_voice") or channel.get("voice") or ""),
|
|
2100
|
+
"Idioma": language_label(channel.get("language") or "pt"),
|
|
2094
2101
|
"Nicho": channel_niche_label(channel),
|
|
2102
|
+
"Blueprint Padrão": channel_blueprint_summary(channel)["name"],
|
|
2103
|
+
"Estilo Wide": wide_style_labels.get(str(channel.get("style_wide") or "").strip().lower(), str(channel.get("style_wide") or "")),
|
|
2104
|
+
"Activo": "Sim" if channel.get("active", True) else "Não",
|
|
2095
2105
|
"Descrição": str(channel.get("description") or ""),
|
|
2106
|
+
"Conta Google do Documento deste Canal": str(channel.get("google_account_email") or youtube_account_labels.get(str(channel.get("google_account_id") or ""), "")),
|
|
2107
|
+
"Automação Ligada": "Sim" if channel.get("automation_on", False) else "Não",
|
|
2108
|
+
"Horário diário (HH:MM)": str(channel.get("automation_time") or "00:00"),
|
|
2109
|
+
"DELEGATED_SESSION_ID": str(channel.get("delegated_session_id") or ""),
|
|
2110
|
+
"Duração Padrão Vídeos (Min)": channel.get("default_video_duration_minutes") if channel.get("default_video_duration_minutes") is not None else None,
|
|
2096
2111
|
"Origem": str(channel.get("import_source") or channel.get("metrics_source") or "manual"),
|
|
2097
|
-
"Activo": "Sim" if channel.get("active", True) else "Não",
|
|
2098
2112
|
}
|
|
2099
2113
|
for channel in registered_channels
|
|
2100
2114
|
]
|
|
@@ -2104,13 +2118,22 @@ def render_channels():
|
|
|
2104
2118
|
hide_index=True,
|
|
2105
2119
|
height=420,
|
|
2106
2120
|
column_config={
|
|
2107
|
-
"
|
|
2108
|
-
"
|
|
2109
|
-
"
|
|
2121
|
+
"URL canal": st.column_config.LinkColumn("URL canal", width=260),
|
|
2122
|
+
"Nome canal": st.column_config.TextColumn("Nome canal", width=180),
|
|
2123
|
+
"Handle canal": st.column_config.TextColumn("Handle canal", width=150),
|
|
2124
|
+
"Narrador/ voz padrão": st.column_config.TextColumn("Narrador/ voz padrão", width=220),
|
|
2125
|
+
"Idioma": st.column_config.TextColumn("Idioma", width=150),
|
|
2110
2126
|
"Nicho": st.column_config.TextColumn("Nicho", width=180),
|
|
2127
|
+
"Blueprint Padrão": st.column_config.TextColumn("Blueprint Padrão", width=240),
|
|
2128
|
+
"Estilo Wide": st.column_config.TextColumn("Estilo Wide", width=150),
|
|
2129
|
+
"Activo": st.column_config.TextColumn("Activo", width=80),
|
|
2111
2130
|
"Descrição": st.column_config.TextColumn("Descrição", width=420),
|
|
2131
|
+
"Conta Google do Documento deste Canal": st.column_config.TextColumn("Conta Google do Documento deste Canal", width=300),
|
|
2132
|
+
"Automação Ligada": st.column_config.TextColumn("Automação Ligada", width=150),
|
|
2133
|
+
"Horário diário (HH:MM)": st.column_config.TextColumn("Horário diário (HH:MM)", width=180),
|
|
2134
|
+
"DELEGATED_SESSION_ID": st.column_config.TextColumn("DELEGATED_SESSION_ID", width=260),
|
|
2135
|
+
"Duração Padrão Vídeos (Min)": st.column_config.NumberColumn("Duração Padrão Vídeos (Min)", width=220),
|
|
2112
2136
|
"Origem": st.column_config.TextColumn("Origem", width=150),
|
|
2113
|
-
"Activo": st.column_config.TextColumn("Activo", width=80),
|
|
2114
2137
|
},
|
|
2115
2138
|
)
|
|
2116
2139
|
st.caption("Tabela de canais cadastrados. Use a barra inferior para navegar horizontalmente e a barra lateral para percorrer os registos.")
|
|
@@ -326,7 +326,7 @@ def _is_retryable_media_error(exc: BaseException) -> bool:
|
|
|
326
326
|
text = str(exc).lower()
|
|
327
327
|
if any(marker in text for marker in ("http 400", "http 401", "http 403", "http 404", "invalid request", "missing", "não tem endpoint")):
|
|
328
328
|
return False
|
|
329
|
-
return any(marker in text for marker in ("http 408", "http 425", "http 429", "http 500", "http 502", "http 503", "http 504", "timeout", "timed out", "connection", "temporarily", "cooldown"))
|
|
329
|
+
return any(marker in text for marker in ("http 402", "http 408", "http 425", "http 429", "http 500", "http 502", "http 503", "http 504", "timeout", "timed out", "connection", "temporarily", "cooldown"))
|
|
330
330
|
|
|
331
331
|
|
|
332
332
|
def generate_image_from_pool(
|
package/package.json
CHANGED