From edec4202ac748c33776eccf6986a7260c4485a22 Mon Sep 17 00:00:00 2001 From: home Date: Mon, 20 Nov 2023 13:05:41 +0300 Subject: [PATCH] vdl : write but dont apply a fix for crashes - use try for now. --- .config/bash/module/vdl.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.config/bash/module/vdl.sh b/.config/bash/module/vdl.sh index 9a17499..0d17004 100644 --- a/.config/bash/module/vdl.sh +++ b/.config/bash/module/vdl.sh @@ -24,7 +24,16 @@ vdl() [[ -f "src.txt" ]] || echo "${target}" > src.txt # Download [LINK] content. - yt-dlp -f 'bestvideo[height<=?1081]+bestaudio/best' --download-archive index.txt --embed-thumbnail --embed-subs --write-auto-subs --embed-metadata --merge-output-format mkv -cio '%(playlist_index)000006d_%(id)s.%(ext)s' "${target}" + yt-dlp -f 'bestvideo[height<=?1081]+bestaudio/best' --download-archive index.txt --embed-thumbnail --embed-subs --write-auto-subs --embed-metadata --merge-output-format mkv -cio '%(playlist_index)000006d_%(id)s.%(ext)s' "${target}" # || _vdl_retry +} + +# Temporary fix for crashes. +_vdl_retry() { + for file in *.part; do + local number="${file%%_*}" + rm ${number}* + done + vdl } # download all videos from file.