mosswg / dropout-dl

A tool for downloading dropout.tv episodes
GNU General Public License v3.0
28 stars 7 forks source link

Downloading "Crown of Candy" episodes results in assertion failure #25

Open worthbak opened 3 months ago

worthbak commented 3 months ago

Describe the bug Attempting to download an episode from the season "A Crown of Candy" results in an assertion failure:

Assertion failed: it != m_data.m_value.object->end() (/app/external/json/include/nlohmann/json.hpp: operator[]: 2142)

To Reproduce

  1. Execute the following docker command, with appropriate credentials at ./app/login:
    docker run --rm -it -v $PWD/login:/app/login -v $PWD/out:/Downloads dropout-dl:latest --output-directory /Downloads --captions -e https://www.dropout.tv/dimension-20-a-crown-of-candy/season:1/videos/ambush-on-the-sucrosi-road

Expected behavior The episode downloads to the output directory.

Actual behavior The following output is generated:

$ docker run --rm -it -v $PWD/login:/app/login -v $PWD/out:/Downloads dropout-dl:latest --output-directory /Downloads --captions -e https://www.dropout.tv/dimension-20-a-crown-of-candy/season:1/videos/ambush-on-the-sucrosi-road
Logging in...
Successfully logged in.
Cached tokens to /root/.cache/dropout-dl/token-cache
Assertion failed: it != m_data.m_value.object->end() (/app/external/json/include/nlohmann/json.hpp: operator[]: 2142)

Desktop (please complete the following information):

worthbak commented 3 months ago

I should note that I am able to download episodes from other seasons, so not sure what's going wrong with ACOC.

Thanks for creating this great tool!

Lertsenem commented 3 months ago

I'm getting the same error on any season/episode download I attempt (dimension 20, I did not try to dl anything else) :

sudo docker run --rm -it -v $PWD/login:/app/login -v $PWD/out:/Downloads dropout-dl:latest --output-directory /Downloads --captions --season https://www.dropout.tv/dimension-20/season:6/ --verbose                                   139 ↵
quality: highest
verbose: 1
url: "https://www.dropout.tv/dimension-20/season:6/"
rate: 2000
captions: 1
Got episode url: https://www.dropout.tv/dimension-20/season:6/ from program arguments
Logging in...
Successfully logged in.
Cached tokens to /root/.cache/dropout-dl/token-cache
Getting season
Dimension 20: Pirates of Leviathan: 
Assertion failed: it != m_data.m_value.object->end() (/app/external/json/include/nlohmann/json.hpp: operator[]: 2142)
owut commented 3 months ago

I'm guessing the api changed.

https://github.com/mosswg/dropout-dl/blob/58fe1d7db8dac4f93225ff2c20708116c79246a6/src/episode.cpp#L210

index_segment no longer exists

And it is now a list of segments that needs to be downloaded, the base_url has changed and needs to cut off earlier, the audio base url now includes ../audio/ compared to the video one. Curl supports ranges so you could get the size of the segment array and download everything and add ffmpeg to combine video+audio+captions to a m4v container.