diff --git a/plexupdate-core b/plexupdate-core index 63bff24..d0ec57e 100755 --- a/plexupdate-core +++ b/plexupdate-core @@ -11,7 +11,7 @@ # Current pages we need - Do not change unless Plex.tv changes again URL_LOGIN='https://plex.tv/users/sign_in.json' URL_DOWNLOAD='https://plex.tv/api/downloads/5.json?channel=plexpass' -URL_DOWNLOAD_PUBLIC='https://plex.tv/api/downloads/1.json' +URL_DOWNLOAD_PUBLIC='https://plex.tv/api/downloads/5.json' # Default options for package managers, override if needed REDHAT_INSTALL="dnf -y install" diff --git a/plexupdate.sh b/plexupdate.sh index 1110563..946b90f 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -54,6 +54,7 @@ AUTOUPDATE=no AUTOSTART=no KEEPREVERTED=no ARCH=$(uname -m) +BUILD="linux-$ARCH" SHOWPROGRESS=no WGETOPTIONS="" # extra options for wget. Used for progress bar. CHECKUPDATE=yes @@ -301,15 +302,10 @@ if [ ! -d "${DOWNLOADDIR}" ]; then fi if [ -z "${DISTRO_INSTALL}" ]; then - if [ -z "${DISTRO}" -a -z "${BUILD}" ]; then + if [ -z "${DISTRO}" ]; then # Detect if we're running on redhat instead of ubuntu if [ -f /etc/redhat-release ]; then REDHAT=yes - if [ "${PUBLIC}" = "yes" ]; then - BUILD="linux-ubuntu-${ARCH}" - else - BUILD="linux-${ARCH}" - fi DISTRO="redhat" if ! hash dnf 2>/dev/null; then DISTRO_INSTALL="${REDHAT_INSTALL/dnf/yum}" @@ -318,18 +314,9 @@ if [ -z "${DISTRO_INSTALL}" ]; then fi else REDHAT=no - if [ "${PUBLIC}" = yes ]; then - BUILD="linux-ubuntu-${ARCH}" - DISTRO="ubuntu" - else - BUILD="linux-${ARCH}" - DISTRO="debian" - fi + DISTRO="debian" DISTRO_INSTALL="${DEBIAN_INSTALL}" fi - elif [ -z "${DISTRO}" -o -z "${BUILD}" ]; then - error "You must define both DISTRO and BUILD" - exit 255 fi else if [ -z "${DISTRO}" -o -z "${BUILD}" ]; then @@ -356,10 +343,6 @@ fi if [ "${PUBLIC}" = "no" ] && ! getPlexToken; then error "Unable to get Plex token, falling back to public release" PUBLIC="yes" - BUILD="linux-ubuntu-${ARCH}" - if [ "${REDHAT}" = "yes" ]; then - DISTRO="ubuntu" - fi fi if [ "$PUBLIC" != "no" ]; then