diff --git a/init/20_update_plex.sh b/init/20_update_plex.sh index e0d7749..443bc8e 100644 --- a/init/20_update_plex.sh +++ b/init/20_update_plex.sh @@ -1,10 +1,14 @@ #!/bin/bash export DEBIAN_FRONTEND=noninteractive INSTALLED=`dpkg-query -W -f='${Version}' plexmediaserver` -if [ "$PLEXPASS" == "1" ]; then - VERSION=$(curl https://raw.githubusercontent.com/linuxserver/misc-files/master/plex-version/plexpass) +if [ $VERSION ]; then + echo "Useing version: $VERSION from Manual" +elif [ "$PLEXPASS" == "1" ]; then + VERSION=$(curl -s https://fanart.tv/webservice/plex/plex.php?v=plexpass | grep "version" | cut -d '"' -f 4) + echo "Useing version: $VERSION from Plexpass latest" else - VERSION=$(curl https://raw.githubusercontent.com/linuxserver/misc-files/master/plex-version/public) + VERSION=$(curl -s https://fanart.tv/webservice/plex/plex.php | grep "version" | cut -d '"' -f 4) + echo "Useing version: $VERSION from Public latest" fi if [ "$VERSION" == "$INSTALLED" ]; then exit 0;