From ec130de20554e772174e2fe44f6d196f0843418e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Sol=C3=ADs?= Date: Mon, 16 Jun 2025 14:45:16 +0000 Subject: [PATCH] fix: Correct creation of temporary file --- youtube-download-channel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube-download-channel.sh b/youtube-download-channel.sh index 45db2ca..ec04b1f 100755 --- a/youtube-download-channel.sh +++ b/youtube-download-channel.sh @@ -120,7 +120,7 @@ total=$(find "${temporary}" -type f -iname "*.info.json" | wc -l) find "${temporary}" -type f -iname "*.info.json" | while read -r x; do count=$((count + 1)) ( - jq '.formats="" | .automatic_captions="" | .thumbnails="" | .tags=""' "${x}" >"${temporary}/${x}.tmp" && mv "${temporary}/${x}.tmp" "${x}" + touch "${temporary}/${x}.tmp" && jq '.formats="" | .automatic_captions="" | .thumbnails="" | .tags=""' "${x}" >"${temporary}/${x}.tmp" && mv "${temporary}/${x}.tmp" "${x}" if [[ -f "${x}" && "${channel}" != "subscriptions" && $(jq -rc ".uploader_id" "${x}") != "@${channel}" ]]; then echo "Video ${x} not uploaded from ${channel}, removing..." && rm "${x}" fi