Skip to content

Cancel is ignored for up to 20 seconds while a YouTube link is being resolved #715

Closed

Description

@thcp

The problem

Clicking Cancel right after starting a YouTube import takes 19 to 22 seconds to take effect. The import sits on "Processing..." the whole time, and the next queued import cannot start until it gives up.

While yt-dlp resolves the link (its metadata probe, which checks the length before anything is downloaded), nothing looks at the cancel request. That probe has no progress hook, and resolving a YouTube link through its JavaScript challenge takes up to twenty seconds. Cancel is only honoured once the probe returns and the download itself starts reporting progress. The pause between network retries is deaf to it as well.

Constraints for a fix

  • The probe is a blocking yt-dlp call with no way to interrupt it from outside.
  • It writes nothing to disk, so a probe that is abandoned can safely finish on its own.
  • Cancel should take effect within about a second, and the next queued job should start straight away.

Found by the acceptance run against the 0.18.2.dev0 Windows build (check E5, measured three times). Being worked on in the feat/song-identification branch.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions