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

Anipy crashes when URL link is broken #196

Closed
Anonimasu1 opened this issue Sep 12, 2024 · 2 comments
Closed

Anipy crashes when URL link is broken #196

Anonimasu1 opened this issue Sep 12, 2024 · 2 comments

Comments

@Anonimasu1
Copy link

Describe the bug
I have it set up to auto run and save to my Jellyfin server. This past week it stopped adding anime. When I looked into it I found that episode 12 of Code Geass Roze dub has a broken link on Yugen. There is a URL for it, but there is no video there. This causes the seasonal scan to crash. With the broken link, the entire system breaks and it becomes unusable unless I manually download each episode to skip over the broken one or remove the problematic series from the seasonals list (which is what I ended up doing). This also prevents my other scripts for renaming and moving to my server from triggering because the anipy command terminates unexpectedly.

To Reproduce
Steps to reproduce the behavior:

  1. Have a series in your seasonal list with a broken link on Yugen
  2. Run a download scan
  3. Anipy crashes when it gets to the series with the broken link
  4. See error

Alternate Way To Reproduce As Of The Time Of Writing

  1. Open anipy in download mode
  2. Search for Code Geass
  3. Select option 1 (Code Geass: Dakkan no Rozé (S/D))
  4. *Choose dub or have it set to default to dubs
  5. Select episode 12
  6. See error

Expected behavior
What should happen is if there is an error with the URL, it should skip that problem and continue on with the other series in the seasonals list. Maybe even generate an error log in the download directory to inform the user there was an issue and with what series, or perhaps the broken URL.

Info
bae@bae-MS-7D25:~$ anipy-cli -D
Download Mode
Downloads are stored in: /home/bae/Videos
? Search Anime: code geass
? Select Show: 1. YU: Code Geass: Dakkan no Rozé (S/D)
? Input Episode Range(s) from episodes 1 to 12: 12
Traceback (most recent call last):
File "/home/bae/.local/bin/anipy-cli", line 8, in
sys.exit(run_cli())
File "/home/bae/.local/pipx/venvs/anipy-cli/lib/python3.10/site-packages/anipy_cli/cli.py", line 60, in run_cli
cli_class(options=args).run()
File "/home/bae/.local/pipx/venvs/anipy-cli/lib/python3.10/site-packages/anipy_cli/clis/base_cli.py", line 31, in run
ret = func()
File "/home/bae/.local/pipx/venvs/anipy-cli/lib/python3.10/site-packages/anipy_cli/clis/download_cli.py", line 98, in process
stream = self.anime.get_video(
File "/home/bae/.local/pipx/venvs/anipy-cli/lib/python3.10/site-packages/anipy_api/anime.py", line 116, in get_video
streams = self.provider.get_video(self.identifier, episode, lang)
File "/home/bae/.local/pipx/venvs/anipy-cli/lib/python3.10/site-packages/anipy_api/provider/providers/yugen_provider.py", line 232, in get_video
for playlist in res["hls"]:

Platform

  • OS: Linux Mint
@DragonOfShuu
Copy link
Contributor

Hey! Your issue has good timing. I recently made a PR that is very similar to this problem. I think I'll make a few edits to my PR and that should solve your issue! I'll link this issue when I finish the edits

sdaqo added a commit that referenced this issue Sep 13, 2024
Addresses #193 & #196 (cli notifies when nothing to download/watch on seasonals) +more
@sdaqo
Copy link
Owner

sdaqo commented Sep 13, 2024

fixed in 3.2.0

@sdaqo sdaqo closed this as completed Sep 13, 2024
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

3 participants