Skip to content

Tautulli Integration

Collin Heist edited this page Jun 29, 2022 · 29 revisions

Background

If Plex is globally enabled, the Maker can monitor an episode's watched status (i.e. watched/unwatched) and modify a card; such as blurring/un-blurring a card. Normally, this process only happens every time the maker is run, which most users will not schedule very frequently (usually every 12 hours).

To address this, the Maker can integrate with Tautulli and bypass the normal (long) run process to specifically remake cards almost immediately after an episode has been watched. This is done by using Tautulli's ability to execute a custom script after an event has occurred, in this case an episode was watched.

Setup

The Maker cannot set up this Tautulli integration for you, as setting up the custom notification agent must be done by the user (you!). The process is quite simple, and detailed below.

NOTE: The process of installing and setting up Tautulli is not covered here. It's fairly easily (especially compared to some other Plex-integration apps).

Step 1. Adding the Script

Because most users have Tautulli (and TitleCardMaker) running in Docker containers, it is not feasible to have the Maker and Tautulli directly communicate with eachother. To circumvent this, the two containers "communicate" only through a shared file. Adding this is step 1.

  1. Navigate to the configuration directory for your instance of Tautulli. This might be /Documents/Tautulli/config, or /mnt/user/appdata/tautulli/ on Unraid. The specific directory isn't important, but it must be accessible within both your Tautulli docker container, and your host computer (if it is running in Docker).

  2. Within the configuration directory from 1.1, create a file called update_card.sh and put the following text:

    #!/bin/sh
    echo "$@" >> update.txt

    The technical details of this file aren't relevant, but it basically writes whatever text we send to the file from Tautulli to a local file update.txt.

  3. If you're on Linux/MacOS, make sure the created file is executable by executing chmod +x ./update_card.sh from the command line/terminal.

Step 2. Setting up Tautulli

We now need to tell Tautulli to execute that script whenever an episode has been watched.

  1. Navigate to your Tautulli web UI (probably some URL like http://196.168.x.xx:8181/home).

  2. In the top right corner, click the Gear icons and then enter the Settings menu.

    Image
  3. From the sidebar, select Notification Agents

    Image
  4. Select Add a new Notification Agent

    Image
  5. Scroll down to and click Script

    Image
  6. On the Configuration tab, select the Script Folder from the dropdown menu and navigate to the folder where the file from Step 1.

  7. Select the Script File as the file we created, update_card.sh

  8. Enter some script timeout - I'd recommend between 30-120 seconds

  9. Optionally enter some description like Update TitleCardMaker. Your Configuration should look like this:

  10. Go to the Triggers tab and toggle the Watched checkbox.

    Image
  11. Go to the Conditions tab and add two conditions (replacing YOUR USERNAME with your actual username):

    Condition Operator Value
    Username is YOUR USERNAME
    Media Type is episode
    Image

    This ensures the script is only run when you watch an episode of TV (not anyone watching anything).

Clone this wiki locally