Skip to content

thejason40/flixpatrol-top10-on-trakt

 
 

Repository files navigation

Flixpatrol Top 10 on Trakt

GitHub License Develop GitHub commits since latest release GitHub Issues or Pull Requests GitHub Issues or Pull Requests

GitHub Actions Workflow Status GitHub Actions Workflow Status

GitHub Downloads (all assets, all releases) GitHub release (latest by date) Static Badge Static Badge Static Badge Static Badge

This tool get TODAY top 10 from flixpatrol and push the result on trakt list (useful for syncing with PMM)

⚠️ Running on your own risk of being IP banned from FlixPatrol

⚠️ Due to some limitation of Flixpatrol, we have to make a search of the movie/show title on trakt. That search is sort by relevance by Trakt. We then get the first item on the list that have the same release year that the wanted movie/show (it should be the first item it the list). If none is found we take the first one on the list. It can cause some bad matching but there is nothing we can do about that.⚠️

Table of Content

1. Getting Started

Linux / macOS

Note: I don't have any macOS device but the step should be the same as Linux.

To get started with Flixpatrol Top 10 on Trakt for Linux / macOS, follow these simple steps:

  1. Create a directory where you want the tool and config file be stored and go in it
    mkdir flixpatrolTop10
    cd flixpatrolTop10
  2. Download the latest release corresponding to the platform where your want to run this tool
    wget https://github.com/Navino16/flixpatrol-top10-on-trakt/releases/download/v2.2.0/flixpatrol-top10-linux
  3. Make the downloaded binary executable
    chmod +x flixpatrol-top10-linux
  4. Run the binary (it will create a directory with config file at first run next to the binary)
    ./flixpatrol-top10-linux
  5. Edit the config file as you want. It's located in ./config/default.json
  6. You can now run the tool periodically with tool like cron

Windows

To get started with Flixpatrol Top 10 on Trakt for Windows, follow these simple steps:

  1. Create a directory where you want the tool and config file be stored and go in it
  2. Download the latest release corresponding to the platform where your want to run this tool
  3. Run the binary (it will create a directory with config file at first run next to the binary)
    1. If you just double-click the executable the window will automatically close. To avoid this you can launch the executable with command line
  4. Edit the config file as you want. It's located in ./config/default.json
  5. You can now run the tool periodically with tool like Task Scheduler

Docker

To get started with Flixpatrol Top 10 on Trakt for Docker, follow these simple steps:

  1. Create a directory where you want the config files to be stored in
  2. Run docker (it will create the config file inside your directory)
    docker run --rm -v "/some/path/flixpatrol-top10/config/:/app/config" ghcr.io/navino16/flixpatrol-top10-on-trakt:latest
  3. Edit the config file as you want
  4. You can now run the tool periodically with tool like cron

2. Configuration

Environment variable

You can pass some environment variables to the tool:

Name Descriptions Values Default
LOG_LEVEL How verbose the log will be error, warn, info, debug info

Configuration file

The configuration file should be stored in a directory named config next to the binary. It should be named default.json.

At first run a default configuration file will be generated with some top10 preconfigured, so you can see the file format. Feel free to edit it.

If there is any configuration error, the tool will exit whit information about the error.

Name Descriptions Values Default
FlixPatrolTop10 An array containing as much as you want top10Config
top10Config.platform Which platform to get from Flixpatrol Any Flixpatrol platform (see this)
top10Config.location Which location to get from Flixpatrol Any Flixpatrol location (see this)
top10Config.fallback If there is no show/movie found, should we fallback to another location? False or any Flixpatrol location (see this) false
top10Config.privacy The privacy of the generated Trakt list private, public private
top10Config.limit How many movie/show we should get from Flixpatrol Number between 1 and 10 (included) 10
top10Config.type Do you want movies, shows or both ? movie, show, both both
top10Config.name Optional name of the list Any valid string A generated name based on the top10 config
FlixPatrolPopular An array containing as much as you want popularConfig
popularConfig.platform Which popular platform to get from Flixpatrol Any Flixpatrol popular platform (see this)
popularConfig.privacy The privacy of the generated Trakt list private, public private
popularConfig.limit How many movie/show we should get from Flixpatrol Number between 1 and 100 (included) 100
Trakt.saveFile Where to save the Trakt session file Any valid path ./config/.trakt
Trakt.clientId You clientId from Trakt (here to get a new one) A valid traktId
Trakt.clientSecret You clientSecret from Trakt (here to get a new one) A valid clientSecret
Cache.enabled Do you want to use cache? (You should) true, false true
Cache.savePath Where to save the caches files Any valid path ./config/.cache
Cache.ttl How long the cache will be valid in seconds Any number greater than 0 604800

Example file

{
  "FlixPatrolTop10": [
    {
      "platform": "netflix",
      "location": "world",
      "fallback": false,
      "privacy": "private",
      "limit": 10,
      "name": "Netflix Top 10 Movies",
      "type": "movies"
    },
    {
      "platform": "disney",
      "location": "world",
      "fallback": false,
      "privacy": "private",
      "limit": 10,
      "name": "Disney Plus Top 10 Shows",
      "type": "shows"
    },
    {
      "platform": "amazon-prime",
      "location": "world",
      "fallback": false,
      "privacy": "private",
      "limit": 10,
      "name": "Amazon Prime Top 10",
      "type": "both"
    },
    {
      "platform": "apple-tv",
      "location": "world",
      "fallback": false,
      "privacy": "private",
      "limit": 10,
      "type": "both"
    },
    {
      "platform": "paramount-plus",
      "location": "world",
      "fallback": false,
      "privacy": "private",
      "limit": 10,
      "type": "both"
    }
  ],
  "FlixPatrolPopular": [
    {
      "platform": "movie-db",
      "privacy": "private",
      "limit": 100
    }
  ],
  "Trakt": {
    "saveFile": "./config/.trakt",
    "clientId": "You need to replace this client ID",
    "clientSecret": "You need to replace this client secret"
  },
  "Cache": {
    "enabled": true,
    "savePath": "./config/.cache",
    "ttl": 604800
  }
}

Trakt

To run this application you need to have a Trakt account and a Client ID / Client Secret.

⚠️ Trakt is limited to 5 list on free account, if you specified more than 5 platform on config the script will fail. Remove some platform from the config or take a VIP account on Trakt

  1. Go here to create a new one or here to login.
  2. Create a new application on your Trakt account
    1. Name: what ever you want
    2. Icon: not needed
    3. Description: not needed
    4. Redirect uri: urn:ietf:wg:oauth:2.0:oob
    5. Javascript (cors) origins: not needed
    6. Permissions: none
  3. Set the given Client ID / Client Secret on the configuration file
  4. Run the app and follow the instructions

About

Get TODAY top10 from flixpatrol and upload them to Trakt

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.4%
  • Dockerfile 0.6%