Skip to content

Commit 950d6b2

Browse files
committed
Merge pull request #32 from linuxserver/plexcompliance
Plexcompliance
2 parents 2120ec0 + c7e8bf9 commit 950d6b2

5 files changed

Lines changed: 24 additions & 19 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ MAINTAINER Stian Larsen <lonixx@gmail.com>
44
# Install Plex
55
RUN apt-get -q update && \
66
PLEXURL=$(curl -s https://tools.linuxserver.io/latest-plex.json| grep "ubuntu64" | cut -d '"' -f 4) && \
7-
apt-get install -qy dbus gdebi-core avahi-daemon wget && \
7+
apt-get install -qy dbus avahi-daemon wget && \
88
wget -P /tmp "$PLEXURL" && \
9-
gdebi -n /tmp/plexmediaserver_*_amd64.deb && \
9+
dpkg -i /tmp/plexmediaserver_*_amd64.deb && \
1010
rm -f /tmp/plexmediaserver_*_amd64.deb && \
1111
apt-get clean && \
1212
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -22,4 +22,4 @@ ADD plexmediaserver /defaults/plexmediaserver
2222

2323
#Mappings and ports
2424
VOLUME ["/config", "/transcode"]
25-
EXPOSE 32400
25+
EXPOSE 32400 32400/udp 32469 32469/udp 5353/udp 1900/udp

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ docker create \
1919
--net=host \
2020
-e VERSION=plexpass \
2121
-e PUID=<UID> -e PGID=<GID> \
22-
-v </path/to/transcode>:/transcode \
2322
-v </path/to/library>:/config \
2423
-v <path/to/tvseries>:/data/tvshows \
2524
-v </path/to/movies>:/data/movies \
@@ -30,7 +29,6 @@ docker create \
3029

3130
* `--net=host` - Shares host networking with container, **required**.
3231
* `-v /config` - Plex library location. *This can grow very large, 50gb+ is likely for a large collection.*
33-
* `-v /transcode` *(optional)* - Transcode directory to offload heavy writes in a docker container.
3432
* `-v /data/xyz` - Media goes here. Add as many as needed e.g. `/data/movies`, `/data/tv`, etc.
3533
* `-e VERSION=` - *(optional)* - Permits specific version selection e.g. `0.9.12.4.1192-9a47d21`, also supports `plexpass` or `latest`
3634
* `-e PGID=` for for GroupID - see below for explanation

init/15_fix_for_transcode.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

init/30_update_plex.sh

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,31 @@ while ! ping -c1 tools.linuxserver.io &>/dev/null; do :; done
1010
#The following error is not an error.
1111
INSTALLED=$(dpkg-query -W -f='${Version}' plexmediaserver)
1212

13+
14+
#Get stuff from things.
15+
PLEX_TOKEN=$( sed -n 's/.*PlexOnlineToken="//p' "/config/Library/Application Support/Plex Media Server/Preferences.xml" | sed "s/\".*//")
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-
VERSION=$(curl -s https://tools.linuxserver.io/latest-plexpass.json | grep "version" | cut -d '"' -f 4)
17-
echo "Using version: $VERSION from Plexpass latest"
18-
elif [[ $VERSION = "latest" || -z $VERSION ]]; then
19-
VERSION=$(curl -s https://tools.linuxserver.io/latest-plex.json| grep "version" | cut -d '"' -f 4)
20-
echo "Using version: $VERSION from Public latest"
25+
26+
if [[ "$VERSION" = latest || "$VERSION" = plexpass ]]; then
27+
VERSION=$PLEX_LATEST
28+
echo "Target version: $VERSION set by: latest\plexpass"
29+
elif [[ -z "$VERSION" ]]; then
30+
echo "Target version: Version not set, Defaulting to supplied version"
2131
else
22-
echo "Using version: $VERSION from Manual"
32+
echo "Target version: $VERSION set by: manually"
2333
fi
2434

35+
36+
37+
2538
last=130
2639
if [[ "$VERSION" == "" ]]; then
2740
echo "ERROR: No version found, running installed version $INSTALLED"
@@ -33,7 +46,7 @@ elif [[ "$VERSION" != "$INSTALLED" ]]; then
3346
last=$?
3447
done
3548
apt-get remove --purge -y plexmediaserver
36-
gdebi -n /tmp/plexmediaserver_"${VERSION}"_amd64.deb
49+
dpkg -i /tmp/plexmediaserver_"${VERSION}"_amd64.deb
3750
else
3851
echo "No need to update!"
3952
fi

plexmediaserver

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
66
# ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
77
PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
88

9-
# where the mediaserver should store the transcodes
10-
PLEX_MEDIA_SERVER_TMPDIR=/transcode
11-
129
# uncomment to set it to something else
1310
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support"
1411

0 commit comments

Comments
 (0)