Code Monkey home page Code Monkey logo

tmdb-color-sorter's Introduction

TMDb List Sorter

Do you ever wish you could sync your Plex movie library with a list on TMDb so that everyone could see what you have?

Do you ever wish that aformentioned TMDb list was color sorted to look aesthetically pleasing?

Well look no further! This program allows you to do just that! (Check out my sorted list)

Here's what you'll need:

  • A Plex Token from your Plex library Find out how to get one here.

  • A Plex movie library.

  • A TMDb API key Find out how to get one here.

  • A TMDb list

    • You'll need the ID for this list, which is the final integer in the list's URL.
  • A Session ID

    • This script assumes that the user (that's mainly been me) has already generated a working session ID). If you haven't, simply change the line:
    SESSION_ID = env['TMDB_SESSION_ID']

    to either this:

    SESSION_ID = None

    or this:

    SESSION_ID = ''

    Doing so will activate the authentication sequence, which will redirect you to TMDb's page with a request token, and will generate a session ID for you.


How it works:

  • Step 0 [optional]: Generate a SESSION_ID via the authentication sequence.
  • Step 1: Extract TMDb IDs from Plex library.
  • Step 2: Download the posters for every movie in your library.
  • Step 3: Use K-Means clustering to identify the most dominant color in each poster.
  • Step 4: Sort the list of movies by the dominant color in their poster.
  • Step 5: Clears the TMDb list of all entries. This gives you a clean slate to work on.
  • Step 6: Adds each movie to the TMDb list specified, sorted by the movie poster color.

tmdb-color-sorter's People

Contributors

sahil-pattni avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.