@danhachuel/thunderbolt 0.5.57 → 0.5.59
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 +19 -14
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -2057,7 +2057,8 @@ def format_metric_number(value: Any) -> str:
|
|
|
2057
2057
|
if value in (None, ""):
|
|
2058
2058
|
return "—"
|
|
2059
2059
|
try:
|
|
2060
|
-
|
|
2060
|
+
normalized = str(value).strip().replace(".", "").replace(",", "")
|
|
2061
|
+
return f"{int(normalized):,}".replace(",", ".")
|
|
2061
2062
|
except (TypeError, ValueError):
|
|
2062
2063
|
return str(value)
|
|
2063
2064
|
|
|
@@ -2207,6 +2208,8 @@ def render_tiktok_channels():
|
|
|
2207
2208
|
st.metric("Seguidores", format_metric_number(channel.get("subscriber_count")))
|
|
2208
2209
|
with card_cols[3]:
|
|
2209
2210
|
st.metric("Curtidas", format_metric_number(channel.get("likes_count")))
|
|
2211
|
+
with card_cols[4]:
|
|
2212
|
+
st.metric("Vídeos", format_metric_number(channel.get("video_count")))
|
|
2210
2213
|
with card_cols[5]:
|
|
2211
2214
|
active = st.toggle("Activo", value=bool(channel.get("active", True)), key=f"tiktok_import_card_active_{channel_id}")
|
|
2212
2215
|
if active != bool(channel.get("active", True)):
|
|
@@ -6725,19 +6728,21 @@ def render_google_accounts(*, include_innertube: bool = True):
|
|
|
6725
6728
|
st.rerun()
|
|
6726
6729
|
|
|
6727
6730
|
st.divider()
|
|
6728
|
-
|
|
6729
|
-
st.
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
with
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6731
|
+
add_account = False
|
|
6732
|
+
with st.expander("Adicionar conta Google/YouTube", expanded=False):
|
|
6733
|
+
st.markdown("### Nova conta Gmail")
|
|
6734
|
+
st.caption("Este formulário fica fora dos cartões das contas existentes. A associação de canais não depende da completude deste documento; ela apenas ficará pendente para Upload directo até os campos serem preenchidos.")
|
|
6735
|
+
with st.form("add_batch_account_form"):
|
|
6736
|
+
add_cols = st.columns(2)
|
|
6737
|
+
with add_cols[0]:
|
|
6738
|
+
new_account_label = st.text_input("Nome da nova conta", value="Canais YouTube", key="new_batch_account_label")
|
|
6739
|
+
new_account_email = st.text_input("E-mail/Gmail", key="new_batch_account_email")
|
|
6740
|
+
new_account_client_id = st.text_input("OAuth Client ID", key="new_batch_account_client_id")
|
|
6741
|
+
with add_cols[1]:
|
|
6742
|
+
new_account_client_secret = st.text_input("OAuth Client Secret", type="password", key="new_batch_account_client_secret")
|
|
6743
|
+
new_account_session_info = st.text_input("sessionInfo token desta conta Google", type="password", key="new_batch_account_session_info", help="Token sessionInfo desta conta. Os cookies e delegated_session_ids ficam no documento; a INNERTUBE_API_KEY é configurada no bloco próprio acima.")
|
|
6744
|
+
new_account_document = st.file_uploader("Documento de cookies/credenciais opcional", type=["json"], key="new_batch_account_credentials_document", help="Pode subir agora um JSON completo ou apenas o documento de cookies. Se não subir, será criado um credentials.json padrão vazio.")
|
|
6745
|
+
add_account = st.form_submit_button("Adicionar conta Google/YouTube", type="primary", use_container_width=True)
|
|
6741
6746
|
if add_account:
|
|
6742
6747
|
document_error = ""
|
|
6743
6748
|
if "@" not in new_account_email.strip():
|
package/package.json
CHANGED