Skip to content

p0lycarpio/tmdb-notifier

Repository files navigation

tmdb-notifier

Monitor TMDB watchlist and notify you when a movie is available on streaming services in your country.

Availability data for movies on streaming services are provided by JustWatch.

Requirements

  • Docker
  • TMDB account and a API key
  • Webhook or Apprise URL (ex: Discord)

Architectures

Architectures supported by this image:

  • linux/amd64 (x86-64)
  • linux/arm/v7 (armhf)
  • linux/arm64

Get started

Clone the repo and build the Doker image with docker build -t tmdb-notifier -f Dockerfile .

Create an .env file or specify environnement variables with -e in the following command. See Environment variables and .env.sample for complete example.

Start the container

docker run -d \
    -v /path/to/localdata:/data
    --env-file .env \
    --name tmdb-notifier ghcr.io/p0lycarpio/tmdb-notifier

Configuration

Container can be setup via a TOML configuration file or environnement variables.

The configuration file must be placed in /data/config.toml. However, the environnement variables will be loaded.

Variables in bold are required.

  • WEBHOOK_URL or APPRISE_URL: webhook or Apprise URL to send notification
  • TMDB_TOKEN: TMDB bearer token
  • TMDB_USERID: TMDB username of the watchlist to monitor
  • WEBHOOK_TYPE: Set to application/json for specify encoding. Default to text/plain
  • NOTIFICATION_BODY: text content of notification. See notifications variables for templating. Default notification: "title (year) is available on services! TMDB link"
  • CRON: crontab trigger rules. Default : 0 20 * * *
  • LANGUAGE: availability of films in your country. Default to en-US
  • SERVICES: filter for streaming services separated by comma. Example: Canal+,Disney Plus,Netflix
  • TZ : timezone. Default : UTC
  • LOGLEVEL stdout verbosity. Default to INFO
  • PUID/PGID: used for Docker volume permissions. Default : 911

Notification variables

You can customize the notification body with available following fields. Insert $(variable) in NOTIFICATION_BODY and it will be replaced.

Variable Description Example
id TMDB movie ID 915935
title Movie title name Anatomy of a Fall
original_title Original movie name Anatomie d'une chute
year Movie year 2023
image TMDB movie background URL https://image.tmdb.org/t/p/w500/kszooR7v1TLFM4pzx6IkKq2jDAN.jpg
overview Synopsis/summary A woman is suspected of her husband’s murder, and their blind son faces a moral dilemma as the sole witness.
poster Movie poster URL https://image.tmdb.org/t/p/w500/kQs6keheMwCxJxrzV83VUwFtHkB.jpg
runtime Runtime in minutes 152
genres Drama & Mystery
languages de, fr & en
original_language fr
url TMDB movie URL https://www.themoviedb.org/movie/915935
services list of flarate services in your country

Other list variables about credits :

  • actors
  • directors
  • writers
  • producers
  • composers

Contributing

Contributors, welcome ! Fork the repo and open PRs.

Run tests with pytest.

TODO

  • Migrate to apprise for implement more notifiers
  • Allow user to modify notification body
  • Create filters for streaming services
  • Implement tests
  • Create configuration file and implement class
  • Build Docker image with actions and push to GHCR
  • TV series support ?