Răsfoiți Sursa

Broader NZB support

Zachary Kotlarek 9 ani în urmă
părinte
comite
8d937c3f9d
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      download.sh

+ 3 - 3
download.sh

@@ -48,15 +48,15 @@ if [ -n "${TRANS_URL}" ] && echo "${URLS}" | head -n 1 | grep -Eqi '^magnet:'; t
 	fi
 
 # Use NZBGet if the URL is an NZB file
-elif [ -n "${NZB_URL}" ] && echo "${URLS}" | head -n 1 | grep -Eqi 'nzb.cat/getnzb/'; then
-	if curl --silent --max-time "${TIMEOUT}" "${NZB_URL}" | grep -q 'version'; then
+elif [ -n "${NZB_URL}" ] && echo "${URLS}" | head -n 1 | grep -Eqi '/getnzb/'; then
+	if curl -k --silent --max-time "${TIMEOUT}" "${NZB_URL}" | grep -q 'version'; then
 		IFS=$'\n'
 		SLEEP=0
 		for i in ${URLS}; do
 			if [ $SLEEP -gt 0 ]; then sleep $SLEEP; fi
 			SLEEP="${DELAY}"
 			NAME="`echo "${i}" | cut -d '#' -f 2-`"
-			RESULT="`curl --silent --max-time "${TIMEOUT}" "${NZB_URL}" \
+			RESULT="`curl -k --silent --max-time "${TIMEOUT}" "${NZB_URL}" \
 				-d '{"method":"append","params":["'"${NAME}"'.nzb","'"${i}"'","",0,false,false,"",0,"force"]}'`"
 			if ! echo "${RESULT}" | grep 'result' | grep -q '[1-9]'; then
 				exit 1