Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyboardInterrupt Exception does not work instantly during episode download to cancel progress #286

Open
nattadasu opened this issue Sep 27, 2023 · 0 comments

Comments

@nattadasu
Copy link

nattadasu commented Sep 27, 2023

As the title suggest, during episode download, when user do Ctrl+C, the progress won't stop or at least prompt UNLESS the episode was successfully downloaded but an exception message: Exiting from the downloading context was thrown after. I think this behavior must be fixed for some use case where user has limited data plan (if user use tethered connection) or wish not to continue downloading the anime.

Reproducing

  1. Try to download an anime from any provider and optimally use range of episodes. In this example, we used allanime with following query:
    animdl download -r "27-72" "Xiao Lu He Xiao Lan"
  2. Select which anime that matches, we use option 2 (Xiao Lu He Xiao Lan)
  3. When animdl starts downloading the episode, start pressing/spamming Ctrl+C keystroke.
  4. Observe.

Expected behavior

Either:

  • A prompt message to cancel shown
  • Write a log that the episode download was cancelled, and abruptly stop the progress

Observed behavior

Episode kept being downloaded. Once reached 100%, an exception was thrown.

image

Notes

If user opted in --idm flag, a confirmation shown to stop the episode scraping.

image

Environment

  • Provider: allanime
  • Scraped page: https://allanime.to/anime/GuWjkbBFSFNxS5BKg
  • animdl version: v1.7.24
  • pipx version: v1.1.0
  • Python version: v3.11.2
  • OS: Windows 11 (Home) x86_64, 10.0.22621.2283 (22H2)
  • Terminal: Windows Terminal v1.17.11461.0
  • Shell: PowerShell v7.3.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant