Phase 1: quick flow fixes

- One message per job: the status message is deleted once the file is
  sent, or shortened to "Sent." when Telegram keeps it.
- No reply quotes in private chats; groups keep them.
- Queue status only mentions the position when the wait is above
  QUEUE_NOTICE_THRESHOLD_SECONDS or somebody is ahead. Status edits are
  throttled to one per 2.5 s per message; a state that arrives too soon
  is shown later instead of dropped. The wait estimate is 0 with a free
  slot.
- Caption with title (uploader and date when generic), uploader,
  duration, a short source link without tracking parameters and an
  optional "via @bot" line (CAPTION_ATTRIBUTION). Uploaded videos get a
  320 px JPEG thumbnail; merged MP4s are written with faststart.
- Buttons under the result: Audio (MP3), Other quality, Thumbnail,
  Delete. Requester only in groups.
- Language resolved once per update and passed in the context. A
  fallback to English is logged as a bug; a test walks every screen in
  Spanish and Dutch. Language picker on the first /start.
- Sizes without a zero decimal ("50 MB").
- First link of a new user shows the card once and sets the default to
  "best that fits my limit".
- Errors offer the next step (Try again, Smaller quality, Upgrade, Open
  app); passing lookup failures are retried once.
- Up to MULTI_LINK_MAX links per message; a link sent a moment ago gets
  "already sent" with a Send again button.
- Mini App menu button, labelled per private chat in the user's
  language.
- Personal /settings in private chats with an "Add me to a group"
  button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Michilis
2026-11-18 20:08:58 +00:00
co-authored by Claude Opus 5.5
parent 3c153af97f
commit 6843053582
52 changed files with 3369 additions and 271 deletions
+35
View File
@@ -61,6 +61,7 @@ unknown = "I do not know that command. Try /help."
# Descriptions in Telegram's command menu. Keep them short.
[menu]
settings_private = "Your settings"
dl = "Download a video from a link"
audio = "Download the audio as MP3"
thumb = "Get the thumbnail"
@@ -136,11 +137,23 @@ one = "Cancelled {{.Count}} download."
other = "Cancelled {{.Count}} downloads."
[card]
first_run = "<i>Next time I start right away with the best quality that fits your limit. /quality changes that.</i>"
looking = "Looking up the link…"
pick = "Pick a format:"
cancelled = "Cancelled."
[btn]
checked = "✓ {{.Label}}"
back = "Back"
add_to_group = "Add me to a group"
referral = "Invite friends"
send_again = "Send again"
upgrade = "Upgrade"
smaller_quality = "Smaller quality"
try_again = "Try again"
result_audio = "Audio (MP3)"
other_quality = "Other quality"
delete = "Delete"
full_settings = "Open full settings"
add_group_credits = "Add group credits"
buy_group_pass = "Buy a group pass"
@@ -163,6 +176,7 @@ subs_auto = "{{.Lang}} (auto)"
resend = "{{.N}}. {{.Title}}"
[status]
sent = "Sent."
queued = "In the queue. Position {{.Position}}, about {{.Wait}}."
downloading = "Downloading…"
downloading_bytes = "Downloading… {{.Done}}"
@@ -176,6 +190,7 @@ failed = "That did not work. {{.Reason}}"
refunded = "{{.Amount}} went back to your balance."
[notice]
cannot_delete = "Telegram only lets me delete messages from the last 48 hours."
group_only = "This command works in groups."
admins_only = "Only admins of this group can do that."
saved = "Saved."
@@ -544,6 +559,18 @@ off = "off"
none = "none"
[settings]
language = "Language"
ask = "Ask every time"
audio_only = "Audio only"
lang_follow = "{{.Lang}} (from Telegram)"
personal = """
<b>Your settings</b>
Default format: {{.Quality}}
Language: {{.Lang}}
Pass until: {{.Pass}} · Balance: {{.Balance}}
Friends invited: {{.Invited}}
Tap a button to change it."""
text = """
<b>Group settings</b>
Balance: {{.Balance}} · Pass until: {{.Pass}}
@@ -579,6 +606,8 @@ Send these in the group, as an admin:
/spending rule - who may spend group credits"""
[quality]
audio_only = "Audio only (MP3)"
fit = "Best that fits my limit"
ask = "Ask every time"
pick = "Pick your default format. I will then start right away instead of asking."
set = "Default format: {{.Quality}}"
@@ -836,3 +865,9 @@ The service comes as it is, without a guarantee that a given site works. Abuse l
Questions: {{.Contact}}"""
support = "Need help? Write to {{.Contact}}.\n\n/help lists what I can do."
[caption]
via = "via @{{.Bot}}"
[dup]
already_sent = "I sent you this a moment ago, it is just above. Tap below to get it again."
+35
View File
@@ -59,6 +59,7 @@ Hasta {{.MaxSize}} y {{.MaxDuration}} por descarga."""
unknown = "No conozco ese comando. Prueba con /help."
[menu]
settings_private = "Tus ajustes"
dl = "Descargar un video desde un enlace"
audio = "Descargar el audio en MP3"
thumb = "Obtener la miniatura"
@@ -127,11 +128,23 @@ one = "Se canceló {{.Count}} descarga."
other = "Se cancelaron {{.Count}} descargas."
[card]
first_run = "<i>La próxima vez empiezo enseguida con la mejor calidad que cabe en tu límite. Con /quality lo cambias.</i>"
looking = "Buscando el enlace…"
pick = "Elige un formato:"
cancelled = "Cancelado."
[btn]
checked = "✓ {{.Label}}"
back = "Volver"
add_to_group = "Añádeme a un grupo"
referral = "Invitar amigos"
send_again = "Enviar otra vez"
upgrade = "Mejorar mi plan"
smaller_quality = "Calidad menor"
try_again = "Reintentar"
result_audio = "Audio (MP3)"
other_quality = "Otra calidad"
delete = "Eliminar"
full_settings = "Abrir todos los ajustes"
add_group_credits = "Cargar créditos al grupo"
buy_group_pass = "Comprar pase de grupo"
@@ -154,6 +167,7 @@ subs_auto = "{{.Lang}} (automático)"
resend = "{{.N}}. {{.Title}}"
[status]
sent = "Enviado."
queued = "En la fila. Posición {{.Position}}, unos {{.Wait}}."
downloading = "Descargando…"
downloading_bytes = "Descargando… {{.Done}}"
@@ -167,6 +181,7 @@ failed = "No funcionó. {{.Reason}}"
refunded = "Se devolvieron {{.Amount}} a tu saldo."
[notice]
cannot_delete = "Telegram solo me deja borrar mensajes de las últimas 48 horas."
group_only = "Este comando funciona en grupos."
admins_only = "Solo los administradores del grupo pueden hacer eso."
saved = "Guardado."
@@ -524,6 +539,18 @@ off = "desactivado"
none = "ninguno"
[settings]
language = "Idioma"
ask = "Preguntar siempre"
audio_only = "Solo audio"
lang_follow = "{{.Lang}} (de Telegram)"
personal = """
<b>Tus ajustes</b>
Formato por defecto: {{.Quality}}
Idioma: {{.Lang}}
Pase hasta: {{.Pass}} · Saldo: {{.Balance}}
Amigos invitados: {{.Invited}}
Toca un botón para cambiarlo."""
text = """
<b>Ajustes del grupo</b>
Saldo: {{.Balance}} · Pase hasta: {{.Pass}}
@@ -559,6 +586,8 @@ Envía esto en el grupo, como administrador:
/spending regla - quién puede gastar créditos del grupo"""
[quality]
audio_only = "Solo audio (MP3)"
fit = "La mejor que cabe en mi límite"
ask = "Preguntar siempre"
pick = "Elige tu formato por defecto. Así empiezo enseguida en vez de preguntarte."
set = "Formato por defecto: {{.Quality}}"
@@ -809,3 +838,9 @@ El servicio se ofrece tal como está, sin garantía de que un sitio determinado
Consultas: {{.Contact}}"""
support = "Necesitas ayuda? Escribe a {{.Contact}}.\n\n/help muestra lo que puedo hacer."
[caption]
via = "vía @{{.Bot}}"
[dup]
already_sent = "Te lo envié hace un momento, está justo arriba. Toca abajo para recibirlo otra vez."
+35
View File
@@ -58,6 +58,7 @@ Tot {{.MaxSize}} en {{.MaxDuration}} per download."""
unknown = "Dat commando ken ik niet. Probeer /help."
[menu]
settings_private = "Je instellingen"
dl = "Een video downloaden via een link"
audio = "De audio als MP3 downloaden"
thumb = "De miniatuur ophalen"
@@ -126,11 +127,23 @@ one = "{{.Count}} download geannuleerd."
other = "{{.Count}} downloads geannuleerd."
[card]
first_run = "<i>Volgende keer begin ik meteen met de beste kwaliteit die binnen je limiet past. Met /quality verander je dat.</i>"
looking = "Link opzoeken…"
pick = "Kies een formaat:"
cancelled = "Geannuleerd."
[btn]
checked = "✓ {{.Label}}"
back = "Terug"
add_to_group = "Voeg me toe aan een groep"
referral = "Vrienden uitnodigen"
send_again = "Opnieuw sturen"
upgrade = "Upgraden"
smaller_quality = "Lagere kwaliteit"
try_again = "Opnieuw proberen"
result_audio = "Audio (MP3)"
other_quality = "Andere kwaliteit"
delete = "Verwijderen"
full_settings = "Alle instellingen openen"
add_group_credits = "Groepstegoed toevoegen"
buy_group_pass = "Groepspas kopen"
@@ -153,6 +166,7 @@ subs_auto = "{{.Lang}} (automatisch)"
resend = "{{.N}}. {{.Title}}"
[status]
sent = "Verstuurd."
queued = "In de wachtrij. Plek {{.Position}}, ongeveer {{.Wait}}."
downloading = "Downloaden…"
downloading_bytes = "Downloaden… {{.Done}}"
@@ -166,6 +180,7 @@ failed = "Dat lukte niet. {{.Reason}}"
refunded = "{{.Amount}} is teruggezet op je saldo."
[notice]
cannot_delete = "Telegram laat me alleen berichten van de afgelopen 48 uur verwijderen."
group_only = "Dit commando werkt in groepen."
admins_only = "Alleen beheerders van deze groep kunnen dat."
saved = "Opgeslagen."
@@ -523,6 +538,18 @@ off = "uit"
none = "geen"
[settings]
language = "Taal"
ask = "Elke keer vragen"
audio_only = "Alleen audio"
lang_follow = "{{.Lang}} (van Telegram)"
personal = """
<b>Je instellingen</b>
Standaardformaat: {{.Quality}}
Taal: {{.Lang}}
Pas tot: {{.Pass}} · Saldo: {{.Balance}}
Uitgenodigde vrienden: {{.Invited}}
Tik op een knop om iets te wijzigen."""
text = """
<b>Groepsinstellingen</b>
Saldo: {{.Balance}} · Pas tot: {{.Pass}}
@@ -558,6 +585,8 @@ Stuur deze in de groep, als beheerder:
/spending regel - wie groepstegoed mag uitgeven"""
[quality]
audio_only = "Alleen audio (MP3)"
fit = "Beste die binnen mijn limiet past"
ask = "Elke keer vragen"
pick = "Kies je standaardformaat. Dan begin ik meteen in plaats van te vragen."
set = "Standaardformaat: {{.Quality}}"
@@ -808,3 +837,9 @@ De dienst wordt geleverd zoals hij is, zonder garantie dat een bepaalde site wer
Vragen: {{.Contact}}"""
support = "Hulp nodig? Schrijf naar {{.Contact}}.\n\n/help laat zien wat ik kan."
[caption]
via = "via @{{.Bot}}"
[dup]
already_sent = "Dit heb ik je net gestuurd, het staat hierboven. Tik hieronder om het opnieuw te krijgen."