@danhachuel/thunderbolt 0.4.52 → 0.4.53
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 +14 -53
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -6809,7 +6809,7 @@ def render_settings():
|
|
|
6809
6809
|
key=f"settings_{key}",
|
|
6810
6810
|
)
|
|
6811
6811
|
|
|
6812
|
-
api_keys_tab, upload_api_keys_tab,
|
|
6812
|
+
api_keys_tab, upload_api_keys_tab, ai_influencers_tab, voice_test_tab = render_localized_tabs(["API Keys", "API Keys Upload", "AI Influencers", "Teste de Voz"])
|
|
6813
6813
|
|
|
6814
6814
|
with api_keys_tab:
|
|
6815
6815
|
with st.container(border=True):
|
|
@@ -6998,41 +6998,18 @@ def render_settings():
|
|
|
6998
6998
|
persist_callback=save_google_lyria,
|
|
6999
6999
|
)
|
|
7000
7000
|
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
)
|
|
7014
|
-
|
|
7015
|
-
with st.expander("Postiz", expanded=False):
|
|
7016
|
-
st.caption("O Thunderbolt é o cliente. A API key é enviada exclusivamente ao servidor Postiz configurado; não é colocada em URLs, logs ou repositório.")
|
|
7017
|
-
postiz_enabled = st.checkbox("Activar Postiz como fallback final", bool(settings.get("postiz_enabled", False)))
|
|
7018
|
-
postiz_mode = st.selectbox("Modo de ligação", ["api", "mcp"], index=0 if settings.get("postiz_mode", "api") != "mcp" else 1, help="API é o modo determinístico de upload. MCP fica disponível para uma ligação compatível com Streamable HTTP.")
|
|
7019
|
-
postiz_cols = st.columns(2)
|
|
7020
|
-
with postiz_cols[0]:
|
|
7021
|
-
postiz_api_key = text_setting("Postiz API key", "postiz_api_key", secret=True, help_text="API key criada nas definições do Postiz. A API HTTP usa o valor bruto no cabeçalho Authorization.")
|
|
7022
|
-
_render_credential_status(postiz_api_key)
|
|
7023
|
-
postiz_base_url = text_setting("Postiz Public API Base URL", "postiz_base_url", help_text="Cloud: https://api.postiz.com/public/v1 · Self-hosted: https://seu-servidor/api/public/v1")
|
|
7024
|
-
postiz_integration_id = text_setting("Postiz integração padrão", "postiz_integration_id", help_text="ID do canal/integração devolvido por GET /integrations.")
|
|
7025
|
-
with postiz_cols[1]:
|
|
7026
|
-
postiz_mcp_url = text_setting("Postiz MCP URL", "postiz_mcp_url", help_text="Cloud: https://api.postiz.com/mcp · o cliente acrescenta a API key conforme o modo escolhido.")
|
|
7027
|
-
postiz_auto_publish = st.checkbox("Permitir publicação imediata no Postiz", bool(settings.get("postiz_auto_publish", False)))
|
|
7028
|
-
st.caption("No Upload, a aba Postiz permite carregar as integrações e enviar vídeos manualmente. No fluxo recomendado, Postiz só é tentado depois da API Oficial e do Upload directo.")
|
|
7029
|
-
_render_api_test_control(
|
|
7030
|
-
settings,
|
|
7031
|
-
"postiz",
|
|
7032
|
-
lambda: test_postiz_credentials(postiz_api_key, postiz_base_url),
|
|
7033
|
-
widget_key="api_test_postiz",
|
|
7034
|
-
)
|
|
7035
|
-
|
|
7001
|
+
upload_post_enabled = bool(settings.get("upload_post_enabled", False))
|
|
7002
|
+
upload_post_api_key = str(settings.get("upload_post_api_key") or "")
|
|
7003
|
+
upload_post_username = str(settings.get("upload_post_username") or "")
|
|
7004
|
+
upload_post_platforms = str(settings.get("upload_post_platforms") or "youtube,tiktok")
|
|
7005
|
+
upload_post_auto_upload = bool(settings.get("upload_post_auto_upload", False))
|
|
7006
|
+
postiz_enabled = bool(settings.get("postiz_enabled", False))
|
|
7007
|
+
postiz_api_key = str(settings.get("postiz_api_key") or "")
|
|
7008
|
+
postiz_base_url = str(settings.get("postiz_base_url") or "https://api.postiz.com/public/v1")
|
|
7009
|
+
postiz_mcp_url = str(settings.get("postiz_mcp_url") or "https://api.postiz.com/mcp")
|
|
7010
|
+
postiz_mode = str(settings.get("postiz_mode") or "api")
|
|
7011
|
+
postiz_integration_id = str(settings.get("postiz_integration_id") or "")
|
|
7012
|
+
postiz_auto_publish = bool(settings.get("postiz_auto_publish", False))
|
|
7036
7013
|
save_all_settings = st.form_submit_button("Guardar configurações do Thunderbolt", type="primary")
|
|
7037
7014
|
if save_all_settings:
|
|
7038
7015
|
settings.update({
|
|
@@ -7067,13 +7044,7 @@ def render_settings():
|
|
|
7067
7044
|
st.subheader("API Keys Upload")
|
|
7068
7045
|
st.caption("Credenciais e integrações utilizadas pelos fluxos de publicação. Cada grupo fica separado para evitar misturar chaves de geração com chaves de upload.")
|
|
7069
7046
|
with st.expander("Contas Google", expanded=False):
|
|
7070
|
-
|
|
7071
|
-
if google_accounts:
|
|
7072
|
-
for account in google_accounts:
|
|
7073
|
-
st.markdown(f"**{account.get('label') or 'Conta Google'}** — {account.get('email') or 'sem e-mail'}")
|
|
7074
|
-
st.info("Para editar documentos de cookies, OAuth e canais associados, abra a subaba Contas Google.")
|
|
7075
|
-
else:
|
|
7076
|
-
st.info("Ainda não existem Contas Google configuradas.")
|
|
7047
|
+
render_google_accounts()
|
|
7077
7048
|
with st.expander("API Innertube", expanded=False):
|
|
7078
7049
|
st.caption("INNERTUBE_API_KEY global usada pelo Upload directo para todas as contas Google/YouTube.")
|
|
7079
7050
|
upload_innertube = st.text_input("INNERTUBE_API_KEY", value=str(settings.get("direct_innertube_api_key") or settings.get("INNERTUBE_API_KEY") or ""), type="password", key="upload_api_innertube_key")
|
|
@@ -7112,16 +7083,6 @@ def render_settings():
|
|
|
7112
7083
|
write_json("settings.json", settings)
|
|
7113
7084
|
st.success("Postiz guardado.")
|
|
7114
7085
|
st.rerun()
|
|
7115
|
-
with google_accounts_tab:
|
|
7116
|
-
render_google_accounts()
|
|
7117
|
-
|
|
7118
|
-
with tiktok_api_tab:
|
|
7119
|
-
st.subheader("API Tiktok")
|
|
7120
|
-
st.info("A configuração desta API foi reorganizada em Configuração API > API Keys Upload > API Tiktok.")
|
|
7121
|
-
|
|
7122
|
-
with bilibili_api_tab:
|
|
7123
|
-
st.subheader("API Bilibili")
|
|
7124
|
-
st.info("A configuração desta API foi reorganizada em Configuração API > API Keys Upload > API Bilibili.")
|
|
7125
7086
|
with ai_influencers_tab:
|
|
7126
7087
|
st.subheader("AI Influencers")
|
|
7127
7088
|
st.caption("Estado do backend usado por Personagens e Geração de Conteúdo IA. O selector e as credenciais são editados nesta aba, em Banco de Dados Influencers.")
|
package/package.json
CHANGED