# Checking for latest Plex Pass release via the API returns old version

**URL:** <https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211>\
**Category:** General Discussions\
**Created:** [March 8, 2018, 3:19am UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211 "2018-03-08T03:19:47Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![demonbane](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/demonbane/32/119002_2.png) [@demonbane](https://forums.plex.tv/u/demonbane)\
**Post date:** [March 8, 2018, 3:19am UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/1 "2018-03-08T03:19:47Z")

</div>

As of sometime recently, the API is returning an older release on the “plexpass” channel than on the regular public channel.

Checking `https://plex.tv/api/downloads/1.json?channel=plexpass` with a valid `X-Plex-Token` header set returns version “1.11.3.4803-c40bba82e”, while either providing an invalid token or just going to `https://plex.tv/api/downloads/1.json` provides “1.12.0.4829-6de959918”.

I’m assuming this is a bug?

---

<div class="post-metadata">

**Author:** ![dirtycajunrice](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dirtycajunrice/32/17955_2.png) [@dirtycajunrice](https://forums.plex.tv/u/dirtycajunrice)\
**Post date:** [March 8, 2018, 5:17am UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/2 "2018-03-08T05:17:58Z")

</div>

So 2 points on this.

1. I can reproduce what you are saying
2. What is the benefit of checking the downloads page with a token header as this is freely available information? (Out of pure curiosity)

---

<div class="post-metadata">

**Author:** ![cdemi](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/cdemi/32/144093_2.png) [@cdemi](https://forums.plex.tv/u/cdemi)\
**Post date:** [March 8, 2018, 10:06am UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/3 "2018-03-08T10:06:10Z")

</div>

> 1. What is the benefit of checking the downloads page with a token header as this is freely available information? (Out of pure curiosity)

IIRC if you don’t pass a valid `X-Plex-Token` you will not get “Plex Pass” versions

---

<div class="post-metadata">

**Author:** ![demonbane](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/demonbane/32/119002_2.png) [@demonbane](https://forums.plex.tv/u/demonbane)\
**Post date:** [March 8, 2018, 8:01pm UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/4 "2018-03-08T20:01:00Z")

</div>

And a constant source of frustration because if you pass an invalid X-Plex-Token it just silently falls back to public releases with no indication that the token was invalid.

---

<div class="post-metadata">

**Author:** ![derekcentrico](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/derekcentrico/32/86438_2.png) [@derekcentrico](https://forums.plex.tv/u/derekcentrico)\
**Post date:** [March 8, 2018, 10:15pm UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/5 "2018-03-08T22:15:40Z")

</div>

I would like to see this resolved as it creates a problem for folks on the Linux-side of the house… We can’t get official updates through the media server itself. Therefore, we rely on great software like [https://github.com/mrworf/plexupdate](https://github.com/mrworf/plexupdate) to provide an alternative route to ensure things get updated regularly. The the bug/issue described herein, software like plexupdate and other scripts out there are broken. And, your loyal paying Plexpass subscribers on Linux are left in the lurch.

---

<div class="post-metadata">

**Author:** ![dirtycajunrice](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dirtycajunrice/32/17955_2.png) [@dirtycajunrice](https://forums.plex.tv/u/dirtycajunrice)\
**Post date:** [March 9, 2018, 1:08am UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/6 "2018-03-09T01:08:39Z")

</div>

I personally pull from the website directly without the api. circumvents this issue entirely. (This is for Ubuntu)

```auto
#!/bin/bash

# Check if ran by root
if [[$UID -ne 0]]; then
    echo 'Script must be run as root'
    exit
fi
# Pull in variables with sensitive information
source variables.conf

# Variables
mylink='https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu&X-Plex-Token='"$plextoken" upgradelink=$(curl -s "$mylink" | cut -d\" -f2)
curver=$(dpkg -l plexmediaserver | awk 'NR==6{print $3}' | cut -d- -f1)
curverdel=$(echo "$curver" | tr -d .)
newver=$(curl -s "$mylink" | cut -d- -f3 | cut -d/ -f2)
newverdel=$(echo "$newver" | tr -d .)
sessions=$(curl -s 'http://127.0.0.1:32400/status/sessions?X-Plex-Token='"$plextoken" | grep "MediaContainer size" | awk -F'[\"]' '{print $2}')

# Check for new version
if ["$curverdel" -lt "$newverdel"]; then
    echo "PlexMediaServer is out of date."
    echo "Current Version: $curver"
    echo "New Version: $newver"
elif ["$curverdel" -eq "$newverdel"]; then
    echo "Plex Media Server is Current."
    echo "Current Version: $curver"
    echo "Exiting script"
    exit
fi

# Install if nothing running
if (( sessions < 1 )) || [[$1 = '--force']]; then
    if [[$1 = '--force']]; then
        echo "There are currently $sessions active sessions"
        echo "forcing installation anyway"
    fi
    echo "Downloading New Version..."
    wget -nv -P /plexupdates/ "$upgradelink" && echo "Download completed successfully"
    echo "Installing New Version"
    dpkg -i /plexupdates/*"$newver"*
else
    echo "There are currently $sessions active sessions"
    echo "Will not stop viewers"
    echo "Exiting script"
    exit
fi

```

---

<div class="post-metadata">

**Author:** ![derekcentrico](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/derekcentrico/32/86438_2.png) [@derekcentrico](https://forums.plex.tv/u/derekcentrico)\
**Post date:** [March 9, 2018, 12:43pm UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/7 "2018-03-09T12:43:31Z")

</div>

@dirtycajunrice First, great username i must say. Second, would you be so kind as to help an ignorant fool like myself by pasting your variables.conf minus the sensitive data so i can give yours a whirl? I’d like to give this a go for sure.

---

<div class="post-metadata">

**Author:** ![dirtycajunrice](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dirtycajunrice/32/17955_2.png) [@dirtycajunrice](https://forums.plex.tv/u/dirtycajunrice)\
**Post date:** [March 10, 2018, 6:05am UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/8 "2018-03-10T06:05:20Z")

</div>

@derekcentrico hey sorry (so used to writing scripts i just assume it can be assertained from the script) i have many variables for many scripts in that file but all you need for this one to work is:

```auto
plextoken='asdfasdfasdfasdf'

```

---

<div class="post-metadata">

**Author:** ![derekcentrico](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/derekcentrico/32/86438_2.png) [@derekcentrico](https://forums.plex.tv/u/derekcentrico)\
**Post date:** [March 10, 2018, 2:16pm UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/9 "2018-03-10T14:16:42Z")

</div>

Thanks man. I guess being so new to using anything outside of what’s built into Plex I expected something more complex. 🙂

---

<div class="post-metadata">

**Author:** ![derekcentrico](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/derekcentrico/32/86438_2.png) [@derekcentrico](https://forums.plex.tv/u/derekcentrico)\
**Post date:** [February 10, 2019, 1:41pm UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/10 "2019-02-10T13:41:11Z")

</div>

Curious, are you experiencing errors with your script nowadays?

I get the following returns when it runs:  
updater.sh: line 20: [: server: integer expression expected  
updater.sh: line 24: [: server: integer expression expected

Additionally, it is odd how it runs dpkg. It seems like it is running the same version on top of itself.

> updater.sh: line 20: [: server: integer expression expected  
> updater.sh: line 24: [: server: integer expression expected  
> Downloading New Version…  
> 2019-02-10 08:31:58 URL:[https://downloads.plex.tv/plex-media-server-new/1.15.0.659-9311f93fd/debian/plexmediaserver\_1.15.0.659-9311f93fd\_amd64.deb](https://downloads.plex.tv/plex-media-server-new/1.15.0.659-9311f93fd/debian/plexmediaserver_1.15.0.659-9311f93fd_amd64.deb) [81547030/81547030] → “/plexupdates/plexmediaserver\_1.15.0.659-9311f93fd\_amd64.deb” [1]  
> Download completed successfully  
> Installing New Version  
> (Reading database … 219656 files and directories currently installed.)  
> Preparing to unpack …/plexmediaserver\_1.15.0.647-67e950f12\_amd64.deb …  
> Removed /etc/systemd/system/multi-user.target.wants/plexmediaserver.service.  
> Unpacking plexmediaserver (1.15.0.647-67e950f12) over (1.15.0.647-67e950f12) …  
> Preparing to unpack …/plexmediaserver\_1.15.0.659-9311f93fd\_amd64.deb …  
> Unpacking plexmediaserver (1.15.0.659-9311f93fd) over (1.15.0.647-67e950f12) …  
> More than one copy of package plexmediaserver has been unpacked  
> in this run ! Only configuring it once.  
> Setting up plexmediaserver (1.15.0.659-9311f93fd) …  
> Created symlink /etc/systemd/system/multi-user.target.wants/plexmediaserver.service → /lib/systemd/system/plexmediaserver.service.  
> Processing triggers for libc-bin (2.27-3ubuntu1) …  
> Processing triggers for ureadahead (0.100.0-20) …  
> Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) …  
> Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) …  
> Processing triggers for mime-support (3.60ubuntu1) …

---

<div class="post-metadata">

**Author:** ![dirtycajunrice](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dirtycajunrice/32/17955_2.png) [@dirtycajunrice](https://forums.plex.tv/u/dirtycajunrice)\
**Post date:** [February 11, 2019, 4:29pm UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/11 "2019-02-11T16:29:09Z")

</div>

it looks like in the last release they changed the format of their download url in the last couple weeks. For example, to download the current 64bit plexpass the url is “[https://downloads.plex.tv/plex-media-server/1.14.1.5488-cc260c476/plexmediaserver\_1.14.1.5488-cc260c476\_amd64.deb](https://downloads.plex.tv/plex-media-server/1.14.1.5488-cc260c476/plexmediaserver_1.14.1.5488-cc260c476_amd64.deb)”  
This could be the reason. Ive long since moved to docker for seamless upgrades, but if you have troubles modifying it feel free to message me. (Im also easier to get ahold of on Discord. DirtyCajunRice#0001)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 8, 2020, 12:43am UTC](https://forums.plex.tv/t/checking-for-latest-plex-pass-release-via-the-api-returns-old-version/228211/12 "2020-01-08T00:43:36Z")

</div>


