From a27a46df23a56aa8c53455359fda177a36d2ccf1 Mon Sep 17 00:00:00 2001 From: unfr Date: Thu, 7 Aug 2025 16:12:39 +0200 Subject: [PATCH] =?UTF-8?q?correction=20de=20la=20r=C3=A9cup=C3=A9ration?= =?UTF-8?q?=20de=20la=20taille=20du=20fichier=20depuis=20bdinfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autopost/posteur.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autopost/posteur.sh b/autopost/posteur.sh index 1503119..8c5ff9a 100644 --- a/autopost/posteur.sh +++ b/autopost/posteur.sh @@ -69,7 +69,11 @@ while true; do echo -e "${JAUNE}VERIF DU NZB${NORMAL}" nzbsizebit=$(bash ${ANALYZER} "${DOSSIER_NZB_ATTENTE}${FILESANSEXT}.nzb" | jq '.Taillebit') echo -e "NZB_SIZE : ${nzbsizebit}" - jsonsizebit=$(jq -r '.media.track[] | select(."@type" == "General") | .FileSize' "${DOSSIER_NFO}${FILESANSEXT}.json") + if [[ "${name}" =~ \.(iso)$ ]]; then + jsonsizebit=$(du -b -c "${name}" | grep total | awk '{ print $1 }') + else + jsonsizebit=$(jq -r '.media.track[] | select(."@type" == "General") | .FileSize' "${DOSSIER_NFO}${FILESANSEXT}.json") + fi echo -e "MEDIAINFO_SIZE : ${jsonsizebit}" if [[ ${nzbsizebit} -le ${jsonsizebit} ]] || [[ ${nzbsizebit} = "NAN" ]]; then