Skip to content

Conversation

@gistrec
Copy link
Owner

@gistrec gistrec commented Nov 30, 2025

Summary

  • add ffmpeg scheduler to periodically update the preparation message with download and conversion progress
  • track download and conversion progress in the file handler and ensure updates are reflected in Telegram
  • allow safe message editing with multiple text fragments and register the new scheduler

Testing

  • python -m compileall handlers schedulers utils

Codex Task

duration_str = format_duration(int(duration))
if duration > MAX_AUDIO_DURATION:
await message.reply_text(
"Файл слишком длинный: {duration_str}\n"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Error message string in handlers/file.py is not an f-string, causing {duration_str} to display literally.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The string literal for the error message "Файл слишком длинный: {duration_str}\n" in handlers/file.py:115-117 is not an f-string. As a result, the {duration_str} placeholder is not interpolated, and users will see the literal text {duration_str} instead of the actual formatted duration. This makes the error message confusing and unhelpful, breaking the intended user experience.

💡 Suggested Fix

Change the string literal to an f-string: f"Файл слишком длинный: {duration_str}\n" in handlers/file.py:115.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: handlers/file.py#L115

Potential issue: The string literal for the error message "Файл слишком длинный:
{duration_str}\n" in `handlers/file.py:115-117` is not an f-string. As a result, the
`{duration_str}` placeholder is not interpolated, and users will see the literal text
`{duration_str}` instead of the actual formatted duration. This makes the error message
confusing and unhelpful, breaking the intended user experience.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 4382644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants