Skip to content

Instantly share code, notes, and snippets.

@Drowze
Last active November 27, 2023 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Drowze/1d8a409cf3a2a84c72249ca782fc1634 to your computer and use it in GitHub Desktop.
Save Drowze/1d8a409cf3a2a84c72249ca782fc1634 to your computer and use it in GitHub Desktop.
Setup plug-ins on plexinc/pms-docker docker image startup
#!/usr/bin/with-contenv bash
PMS_PATH="/config/Library/Application Support/Plex Media Server"
SUBZERO_RELEASE="2.6.5.3268"
# If the first run completed successfully, we are done
if [ -e /.pluginsInstalled ]; then
exit 0
fi
apt update -qq
apt-get -qq install --no-install-recommends git vim tree unzip
mkdir "$PMS_PATH/Plug-ins"
cd "$PMS_PATH/Plug-ins"
# Absolute-Series-Scanner & Hama.bundle
git clone --depth 1 https://github.com/ZeroQI/Hama.bundle.git --single-branch
for dataItem in AniDB Plex OMDB TMDB TVDB/blank TVDB/_cache/fanart/original TVDB/episodes TVDB/fanart/original TVDB/fanart/vignette TVDB/graphical TVDB/posters TVDB/seasons TVDB/seasonswide TVDB/text FanartTV; do
mkdir -p "$PMS_PATH/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/$dataItem"
done
mkdir -p "$PMS_PATH/Scanners/Series"
curl https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/master/Scanners/Series/Absolute%20Series%20Scanner.py -o "$PMS_PATH/Scanners/Series/Absolute Series Scanner.py"
curl https://github.com/pannal/Sub-Zero.bundle/releases/download/$SUBZERO_RELEASE/Sub-Zero.bundle-$SUBZERO_RELEASE.zip -LO
unzip -qo Sub-Zero.bundle-$SUBZERO_RELEASE.zip
rm Sub-Zero.bundle-$SUBZERO_RELEASE.zip
chown -R plex:plex "$PMS_PATH/Plug-ins"
chown -R plex:plex "$PMS_PATH/Plug-in Support"
chown -R plex:plex "$PMS_PATH/Scanners"
apt-get autoremove --purge -y git unzip
apt-get clean
rm -rf /var/lib/apt/lists /var/cache/apt/archives
cd -
touch ./pluginsInstalled
echo "Plex Media Server plug-ins installed"
FROM plexinc/pms-docker
COPY 41-setup-plex-plugins /etc/cont-init.d/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment