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