From 849e34dbf36814dc31604fd13e49b099d04d0c42 Mon Sep 17 00:00:00 2001 From: lonix Date: Thu, 9 Jul 2015 08:39:16 +0200 Subject: [PATCH] Added posibility to set own value for plex --- init/20_update_plex.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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;