diff --git a/plexupdate.sh b/plexupdate.sh index 3d55aad..a459d0c 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -454,7 +454,7 @@ fi echo -n "Finding download URL to download..." # Set "X-Plex-Token" to the auth token, if no token is specified or it is invalid, the list will return public downloads by default -RELEASE=$(wget --header "X-Plex-Token:"${TOKEN}"" --load-cookies /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${URL_DOWNLOAD}" -O - 2>/dev/null | grep -ioe '"label"[^}]*' | grep -i "\"distro\":\"${DISTRO}\"" | grep -i "\"build\":\"${BUILD}\"") +RELEASE=$(wget --header "X-Plex-Token:"${TOKEN}"" --load-cookies /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${URL_DOWNLOAD}" -O - 2>/dev/null | grep -ioe '"label"[^}]*' | grep -i "\"distro\":\"${DISTRO}\"" | grep -m1 -i "\"build\":\"${BUILD}\"") DOWNLOAD=$(echo ${RELEASE} | grep -m1 -ioe 'https://[^\"]*') CHECKSUM=$(echo ${RELEASE} | grep -ioe '\"checksum\"\:\"[^\"]*' | sed 's/\"checksum\"\:\"//') echo "OK"