animdl
animdl copied to clipboard
KeyboardInterrupt Exception does not work instantly during episode download to cancel progress
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
- 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" - Select which anime that matches, we use option
2(Xiao Lu He Xiao Lan) - When
animdlstarts downloading the episode, start pressing/spamming Ctrl+C keystroke. - 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.
Notes
If user opted in --idm flag, a confirmation shown to stop the episode scraping.
Environment
- Provider: allanime
- Scraped page: https://allanime.to/anime/GuWjkbBFSFNxS5BKg
-
animdlversion:v1.7.24 -
pipxversion: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