Skip to content
/ scrobblex Public

Self-hosted app that enables Plex scrobbling (and rating) integration with Trakt via webhooks

License

Notifications You must be signed in to change notification settings

ryck/scrobblex

Repository files navigation


Project license

Pull Requests welcome code with love by ryck

Plex Pass Docker latest version MIT License Pulls from DockerHub GitHub release date GitHub last commit

Table of Contents

πŸ’‘ About

Scrobblex is a self-hosted nodejs app that enables Plex scrobbling integration with Trakt via webhooks. It also allows you to push your ratings to Trakt.

Plex provides webhook integration for all Plex Pass subscribers, and users of their servers. A webhook is a request that the Plex application sends to third party services when a user takes an action, such as watching a movie or episode.

You can ask Plex to send these webhooks to this app, which will then log those plays in your Trakt account.

This tool is not affiliated with, endorsed by, or associated with Plex Inc.

Screenshots

This is basically a command line app, so there are no screenshots really, BUT I wanted to have at least some pretty logs:

Screenshot

πŸš€ Features

  • Scrobble Plex plays to Trakt
  • Push Plex ratings to Trakt
  • Self-hosted
  • No Trakt VIP account required

πŸ₯ Getting Started

You don't need a Trakt VIP account to use this app (scrobblex will take care of that), BUT you need a Plex Pass subscription in order to have access to webhooks.

Usage

git clone https://github.com/ryck/scrobblex.git && cd scrobblex
npm install
npm run start

Once Scrobblex is running, just go to http://$YOUR_IP:$PORT/ (ie: http://10.20.30.40:3090/) and a web page will guide you to get your token.

Docker

Scrobblex is designed to be run in Docker. You can host it right on your Plex server!

To run it yourself, first create an API application through Trakt here. Set the Allowed Hostnames to be the URI you will hit to access Scrobblex, plus /authorize. So if you're exposing your server at http://10.20.30.40:3090, you'll set it to http://10.20.30.40:3090/authorize. Bare IP addresses and ports are totally fine, but keep in mind your Scrobblex instance must be accessible to all the Plex servers you intend to play media from.

Again, once Scrobblex is running, just go to http://$YOUR_IP:$PORT/ (ie: http://10.20.30.40:3090/) and a web page will guide you to get your token.

Using docker run

docker run \
  --name=scrobbler \
  --restart always \
  -v <path to configs>:/app/data \
  -e TRAKT_ID=<trakt_id> \
  -e TRAKT_SECRET=<trakt_secret> \
  -p 3090:3090 \
  rickgc/scrobblex:latest

Using compose.yml

services:
  scrobbled:
    image: rickgc/scrobblex:latest
    container_name: scrobblex
    restart: always
    ports:
      - 3090:3090
    environment:
      - TRAKT_ID=YOUR_TRAKT_ID
      - TRAKT_SECRET=YOUR_TRAKT_SECRET
      - LOG_LEVEL=info
    volumes:
      - ./scrobblex:/app/data

πŸ“„ Environment Variables

Variable Default Description
TRAKT_ID undefined Trakt application ID
TRAKT_SECRET undefined Trakt application secret
PLEX_USER undefined Plex username (comma separated list if you want to allow multiple users)
PORT 3090 Exposed express port
LOG_LEVEL info winston log level: ie: info, debug

🚧 Roadmap

See the open issues for a list of proposed features (and known issues).

πŸ›Ÿ Support

Reach out to the maintainer at one of the following places:

FAQ

How to get your Plex user

You can find your plex user (don't confuse it with your Plex ID) by going to the Plex website and logging in. Your username will be in the top right corner.

Alternatively, you can find it by going to your account settings. Your username will be below your profile picture.

🀝🏻 Contributing

First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please read our contribution guidelines, and thank you for being involved!

πŸ‘₯ Authors & contributors

The original setup of this repository is by Ricardo Gonzalez.

For a full list of all authors and contributors, see the contributors page.

πŸ›‘οΈ Security

scrobblex follows good practices of security, but 100% security cannot be assured. scrobblex is provided "as is" without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

πŸͺͺ License

This project is licensed under the MIT license.

See LICENSE for more information.

❀️ Acknowledgements

XanderStrike for his goplaxt project (now sadly dicontinued). It was a great inspiration for this project. Scrobblex is basically the same thing, but in NodeJS, so kudos to him!

If you want something more powerful, (or something that doesn't need a plex pass), check PlexTraktSync, it's an awesome project that will allow you to sync your watched media, your ratings, your lists, etc. from Plex to Trakt.