pystardust / ani-cli

A cli tool to browse and play anime
GNU General Public License v3.0
7.44k stars 530 forks source link

Can't download episode in dub #1260

Closed FilipLac closed 5 months ago

FilipLac commented 6 months ago

Metadata Version: 4.7.3 OS: Ubuntu-22.04 (Using WSL 2.0) Shell: bash 5.1.16 Anime: Mushoku Tensei Isekai Ittara Honki Dasu Part 2 Episode 12

Describe the bug Downloading is broken. When I select this episode, I get error (posted bellow in screenshot) right after 1-2 seconds. Downloading episode 12 without dub works fine, but I would like English dub. Also I can't access the URL that it is trying to pull from this episode (error 403 forbidden)

Steps To Reproduce

  1. Run ani-cli -d --dub -q best Mushoku Tensei
  2. Choose 4 (Mushoku Tensei: Isekai Ittara Honki Dasu Part 2 (12 episodes))
  3. Choose episode 12

Expected behavior It should download Episode 12 of season 1 part 2, with English dub.

Screenshots

MushokuTenseiError

Additional context

FilipLac commented 6 months ago

And also in ''How a Realist Hero Rebuilt the Kingdom Part 2'' (which is named Season 2 for some reason in script). Almost every episode downloads without 3 episodes (ep 10, 12, 13).

It is also happening with the same error. Network is working fine and downloading other episodes work.

Sarvasv-0 commented 5 months ago

Final Edit: It seems to be a curl or allanime bug, I tried to download the same anime and episode in different quality and it worked.. you can try to download in an inferior quality, which might infact work for you.

also -q best is not necessary as ani-cli downloads the episode in best quality by default

71zenith commented 5 months ago

@FilipLac it seems that the auto selected mp4 links are dead for some reason. in this case u can try other qualities like m3u8 and Mp4 . You can check the specific qualities available for a given episode by using ANI_CLI_PLAYER=debug ani-cli <anime> We can't feasibly check every link for their validity every time so some will need to be manually checked.

CoolnsX commented 5 months ago

We need to remove wixmp provider

FilipLac commented 5 months ago

Ok, thank you for response, what would be then best way to download them ? Should I use -q m3u8, or is there another witch for this that I could use ?

port19x commented 5 months ago

@FilipLac it seems that the auto selected mp4 links are dead for some reason. in this case u can try other qualities like m3u8 and Mp4 . You can check the specific qualities available for a given episode by using ANI_CLI_PLAYER=debug ani-cli <anime> We can't feasibly check every link for their validity every time so some will need to be manually checked.

when did we implement m3u8 and mp4 as -q parameters?

FilipLac commented 5 months ago

@FilipLac it seems that the auto selected mp4 links are dead for some reason. in this case u can try other qualities like m3u8 and Mp4 . You can check the specific qualities available for a given episode by using ANI_CLI_PLAYER=debug ani-cli <anime> We can't feasibly check every link for their validity every time so some will need to be manually checked.

I tried -q Mp4 and it also failed, because it tried to use the forbidden links, but it appears that m3u8 works

Derisis13 commented 5 months ago

@FilipLac it seems that the auto selected mp4 links are dead for some reason. in this case u can try other qualities like m3u8 and Mp4 . You can check the specific qualities available for a given episode by using ANI_CLI_PLAYER=debug ani-cli <anime> We can't feasibly check every link for their validity every time so some will need to be manually checked.

when did we implement m3u8 and mp4 as -q parameters?

It's not explicitely implemented but a consequence of how we handle quality selection in v4:

select_quality() {
    case "$1" in
        best) result=$(printf "%s" "$links" | head -n1) ;;
        worst) result=$(printf "%s" "$links" | grep -E '^[0-9]{3,4}' | tail -n1) ;;
        *) result=$(printf "%s" "$links" | grep -m 1 "$1") ;;
    esac
    [ -z "$result" ] && printf "Specified quality not found, defaulting to best\n" 1>&2 && result=$(printf "%s" "$links" | head -n1)
    printf "%s" "$result" | cut -d'>' -f2
}