pystardust / ani-cli

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

--download fails to download episode (it plays fine without the flag though) #1116

Closed niveK77pur closed 1 year ago

niveK77pur commented 1 year ago

Metadata Version: 4.2.0 (from AUR) OS: Garuda Linux (Arch) Shell: bash Anime:

Describe the bug Downloading downloads a file with the following contents. You can immediately tell that something went wrong because the download completes immediately and leaves a file of ~300B.

Example for Skip to Loafer EP 5, but the contents look similar for other episodes /animes where it does not work:

#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=4122390,RESOLUTION=1280x720,FRAME-RATE=23.974,CODECS="avc1.640028,mp4a.40.2",VIDEO-RANGE=SDR
/st/ep_F6GnecMw2DFoe4Mm4_5_sub-720
#EXT-X-STREAM-INF:BANDWIDTH=1092198,RESOLUTION=640x360,FRAME-RATE=23.974,CODECS="avc1.4d401e,mp4a.40.2",VIDEO-RANGE=SDR
/st/ep_F6GnecMw2DFoe4Mm4_5_sub-360

Here another example of KonoSuba EP 3

#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=4117421,RESOLUTION=1280x720,FRAME-RATE=23.974,CODECS="avc1.640028,mp4a.40.2",VIDEO-RANGE=SDR
/st/ep_JhgwqSa9KnTMLhhjz_3_sub-720
#EXT-X-STREAM-INF:BANDWIDTH=1090137,RESOLUTION=640x360,FRAME-RATE=23.974,CODECS="avc1.4d401e,mp4a.40.2",VIDEO-RANGE=SDR
/st/ep_JhgwqSa9KnTMLhhjz_3_sub-360

The peculiar thing is that the episode streams just fine when I remove the download flag.

Steps To Reproduce

  1. Run ani-cli -d -e 5 skip to loafer

or alternatively

  1. Run ani-cli -d skip to loafer
  2. Select episode 5

Expected behavior If streaming works, I suspect downloading should work as well. (Preferably using aria2 because I often saw the ffmpeg downloads struggle and fail which causes chunks of the episode to not be present; maybe this is another issue to this one, in which case I'd be happy to open one if I encounter the problem again!)

Screenshots image

Additional context I feel like saying this phenomenon mostly manifests for seasonals where the episode released in the past couple of days (this is probably a biased statement because seasonals cover the majority of what I am using this tool for as of now). However, I did not go back to double check if the problem still persist on the episodes in question, but I would assume yes given that KonoSuba EP 3 is giving problems (it must have come out ~3 weeks ago). This issue is a relatively recent observation as well (as of this season).

Derisis13 commented 1 year ago

We have had some minor versions since 4.2.0, first please try upgrading (either to the ani-cli-git package from the AUR or using ani-cli -U). I'll also look for clues on what is going on

71zenith commented 1 year ago

This issue was fixed in 4.2.6. Please try to update using the above mentioned methods

niveK77pur commented 1 year ago

Thank you for the response! I got the ani-cli-git package and the problem with the "empty" files seems resolved now!

The downloads happen are done using ffmpeg though and I saw the issue that I briefly mentioned about errors while downloading. Second time around it worked fine though ... I shall open an issue about it if I encounter it again!

Thanks again!