File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,18 +14,20 @@ INSTALLED=$(dpkg-query -W -f='${Version}' plexmediaserver)
1414# Get stuff from things.
1515PLEX_TOKEN=$( sed -n ' s/.*PlexOnlineToken="//p' " /config/Library/Application Support/Plex Media Server/Preferences.xml" | sed " s/\" .*//" )
1616[ -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 )
1817
1918[ " $PLEXPASS " ] && echo " PLEXPASS is deprecated, please use VERSION"
2019if [[ -z $VERSION && " $PLEXPASS " == " 1" || $VERSION = " plexpass" ]]; then echo " VERSION=plexpass is depricated please use version latest" ; fi
2120
22-
21+ v
2322# Start update rutine
2423
2524
2625if [[ " $VERSION " = latest || " $VERSION " = plexpass ]]; then
27- VERSION=$PLEX_LATEST
26+ VERSION=$( 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 )
2827 echo " Target version: $VERSION set by: latest\plexpass"
28+ elif [[ " $VERSION " = public ]]; then
29+ VERSION=$( curl -s " https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu&X-Plex-Token=" | cut -d " /" -f 5 )
30+ echo " Target version: $VERSION set by: public"
2931elif [[ -z " $VERSION " ]]; then
3032 echo " Target version: Version not set, Defaulting to supplied version"
3133else
You can’t perform that action at this time.
0 commit comments