Skip to content

Sponsor time subtracted twice in post-download confirmation flow #4

Description

@miridius

probeDuration returns the duration of the downloaded file (sponsors already removed by yt-dlp), but handlers.ts:51 writes it into info.duration while keeping sponsorblock_chapters. calcDuration then subtracts skippedTime again — in the confirmation prompt (handlers.ts:81) and in the Telegram upload duration (download-video.ts sendVideo).

Failure: 25-min video with 5 min of sponsors → file is ~20 min, prompt says ~15 min, and can falsely drop below LONG_VIDEO_THRESHOLD_SECS so confirmation never fires.

Fix direction: distinguish source duration from output-file duration (e.g. separate field) instead of overloading info.duration. Found by /review-pr baseline (code-reviewer + type-design-analyzer agree).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions