fix: download feature

This commit is contained in:
JimboKearn 2021-10-07 18:02:10 +05:30
parent 74adb643a4
commit 1fb81f0ba5

View File

@ -216,7 +216,8 @@ open_episode () {
# add 0 padding to the episode name # add 0 padding to the episode name
episode=$(printf "%03d" $episode) episode=$(printf "%03d" $episode)
{ {
curl -L -# -C - "$video_url" -o "${anime_id}-${episode}.mp4" && ffmpeg -headers "Referer: $dpage_url" -i "$video_url" \
-codec copy "${anime_id}-${episode}.mkv" >/dev/null 2>&1 &&
printf "${c_green}Downloaded episode: %s${c_reset}\n" "$episode" || printf "${c_green}Downloaded episode: %s${c_reset}\n" "$episode" ||
printf "${c_red}Download failed episode: %s${c_reset}\n" "$episode" printf "${c_red}Download failed episode: %s${c_reset}\n" "$episode"
} }