A Python script that automatically sends Discord notifications whenever new items are added to your Plex watchlist.
- Python or Python3
- Install dependencies using pip:
pip install -r requirements.txt
- A Plex Media Server
- A Discord webhook
- Get your Plex Token: Instructions can be found on Plex's support site: Finding an Authentication Token (X-Plex-Token)
- Create a Discord Webhook: Instructions are available on Discord's support site: Intro to Webhooks
- Edit the script:
- Replace
<plex token>
with your actual Plex token. - Replace
<webhook url>
with your Discord webhook URL. - Replace
<Username>
and<Password>
with your Plex account credentials.
- Replace
- Make sure your Plex Media Server is running.
- Run the script:
python plex_watchlist_notifier.py
- The script connects to your Plex Media Server using your Plex token.
- It retrieves your initial watchlist.
- The script enters a loop:
- It periodically fetches an updated version of your watchlist.
- It compares the updated watchlist to the previous version to identify newly added items.
- For each new item, it sends a notification to your Discord channel via the webhook.
- You can change the
PLEX_URL
if your Plex server isn't running locally. - You can adjust the
time.sleep(30)
value to control how frequently the script checks for changes. (Default is 30 so as to not hit Plex's API rate limit)