Golang service to expose a Plex Playlist using the Plex API.
Usage
[!IMPORTANT]
Please remember to set the keyCacheSalt field in the config. Without this, a default random salt will be used
and the checkbox state will not be accurately persisteded in local storage. Every service restart will result in a new
salt and, thus, a new checkbox ID.
Copy config.json.template to config.json and populate with your specifics
Run with go run . to test your config locally
Build and Package
Build with ./scripts/build.sh
Package with ./scripts/package.sh
Deploy (general Linux distro)
Copy the package to your server (e.g. scp plex-playlister.tar.gz my-server:/opt/)
Connect to server (e.g. ssh my-server)
Change to the deploy directory (e.g. cd /opt)
Unpack the archive (e.g. tar xvf plex-playlister.tar.gz)
Create a systemd config (e.g. vi /etc/systemd/system/plex-playlister.service)
# Make sure to enable this Unit so it comes up on reboot with
# `systemctl enable plex-playlister`
[Unit]
Description=plex-playlister
After=network.target
[Service]
User=www-data
Environment=GO_ENV=production
TimeoutStartSec=0
WorkingDirectory=/opt/plex-playlister
ExecStart=/opt/plex-playlister/plex-playlister
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target
Need to tweak go-plex-client? Commit change to https://github.com/derezzolution/go-plex-client. From this repo,
pull the latest with go get -u github.com/derezzolution/go-plex-client@4db197a where 4db197a is the latest commit.