File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,17 +10,29 @@ while ! ping -c1 tools.linuxserver.io &>/dev/null; do :; done
1010# The following error is not an error.
1111INSTALLED=$( dpkg-query -W -f=' ${Version}' plexmediaserver)
1212
13+
14+ # Get stuff from things.
15+ PLEX_TOKEN=$( )
16+ [ -z PLEX_TOKEN ] && echo " Plex token not avalible, please login " && exit 0
17+ PLEX_LATEST=$( curl -s " https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu&X-Plex-Token=$PLEX_TOKEN " | cut -d " /" -f 5 )
18+
1319[ " $PLEXPASS " ] && echo " PLEXPASS is deprecated, please use VERSION"
20+ if [[ -z $VERSION && " $PLEXPASS " == " 1" || $VERSION = " plexpass" ]]; then echo " VERSION=plexpass is depricated please use version latest" ; fi
21+
22+
23+ # Start update rutine
1424
15- if [[ -z $VERSION && " $PLEXPASS " == " 1" || $VERSION = " plexpass" ]]; then
16- echo " Usage of VERSION=PLEXPASS is depricated. latest\plexpass is automatic based upon your plex account."
17- elif [[ $VERSION = " latest" || -z $VERSION ]]; then
18- VERSION=$( curl -s https://tools.linuxserver.io/latest-plex.json| grep " version" | cut -d ' "' -f 4)
19- echo " Using version: $VERSION from latest"
25+
26+ if [ " $VERSION " = latest || " $VERSION " = plexpass ]; then
27+ VERSION=$PLEX_LATEST
28+ echo " Target version: $VERSION set by: latest\plexpass"
2029else
21- echo " Using version: $VERSION from Manual "
30+ echo " Target version: $VERSION set by: manually "
2231fi
2332
33+
34+
35+
2436last=130
2537if [[ " $VERSION " == " " ]]; then
2638 echo " ERROR: No version found, running installed version $INSTALLED "
You can’t perform that action at this time.
0 commit comments