Plex2Netflix - Compare your library to what is available on Netflix

I looked and didn’t see this tool being discussed. All credit goes to /u/spacek33z on Reddit.

Github repo

From the README:
This simple tool checks how much of your media from Plex is available to watch on Netflix, and gives you a nice summary with the percentage of media that is available.

I made this tool because I someday want to make the jump to Netflix, but I want to know beforehand how much of my media is available there.

It works by using the Plex Web API to get a list of all media from given library section. If an item has an IMDb ID (you need to enable the IMDb agent for this in Plex), it uses this to search in the Netflix Roulette API. If there is no IMDb ID, the item title and year are used.

Install

You need to have Node.js installed. Install the tool with the node package manager:

npm install -g SpaceK33z/plex2netflix

To update, just run the command above again.

Usage

First, you need to get your API token from Plex.

plex2netflix --host 192.168.0.42 --token=xxx --section=Movies

Optionally comma-separate the sections like --section=Movies,Shows. If you leave out --section, it will try to automatically find libraries.

If your Plex server lives at a non-default port, you can use --port.

Maybe you only want to know if media from this release year is already on Netflix:

plex2netflix --host 192.168.0.42 --token=xxx --section=Movies --year=2015

You need to have Node.js installed. Install the tool with the node package manager:

npm install -g SpaceK33z/plex2netflix

I’ve submitted a pull request for this, but just FYI, you’ll need git to install it too.

great, i’ve been looking for something like this for a lot of time… one question: does it search in the correct country/library for netflix, or uses USA library?

This works great…except it crashed my plex server. I guess it didn’t like comparing 1200+ movies.

Any chance you could do the reverse?

Lookup all movies on Netflix and tell us what Netflix has that we don’t?

Many of us have larger libraries than Netflix so the inverse would work better.

@RevitXman said:
This works great…except it crashed my plex server. I guess it didn’t like comparing 1200+ movies.

I got it to work too, but it also crashed my plex server.

Lol I’m guessing you won’t be switching any time soon.

This looks great, but still a bit too much work for me to get it going in my Windows 7 and Python 2.7 environment.
See my request here - https://forums.plex.tv/discussion/193152/request-big-company-library-checker
Get THAT first post going and working in Plex and or python 2.7 automatically, and I’d likely make reasonably large US cash paypal donation.

So my Export is finding things availble on Netflix DVD but not available on Netflix streaming. Also I am constantly getting the title returned with the following in a bracket on every movie. I dont see anything about IMDB agents on Plex as described above.
Example:
Apocalypse Pompeii (2014, no imdb id) - nope
Carrie (2013, no imdb id) - yes (Not actually on Netflix that I could see.)
Batman Forever (1995, no imdb id) - nope

Media searched: 715
Media available on netflix: 120
Percent available on netflix: 16.78%

I usually dont keep anything that is on netflix so this is a high number and I dont want to double check them manually.

@JamminR said:
This looks great, but still a bit too much work for me to get it going in my Windows 7 and Python 2.7 environment.

What? Are you serious? It’s really easy. Just install NodeJS and follow the instructions - and you are done. Find NodeJS here: Download | Node.js

@jeroendop - Thanks. Unfortunately, another 3rd party package I don’t want to have to install and maintain to keep up to date with security patches. I already wasn’t happy I had to add Python just to run something I thought should already have been included in a media server. (which, is python, but not advanced enough to run other items)
If this project ever fits my need fully, then perhaps I’ll look into installing it.
Me sending a list to those I share with just wouldn’t be in their face enough to make it valuable to me at this time.

@JamminR said:
@jeroendop - Thanks. Unfortunately, another 3rd party package I don’t want to have to install and maintain to keep up to date with security patches. I already wasn’t happy I had to add Python just to run something I thought should already have been included in a media server. (which, is python, but not advanced enough to run other items)
If this project ever fits my need fully, then perhaps I’ll look into installing it.
Me sending a list to those I share with just wouldn’t be in their face enough to make it valuable to me at this time.

I’ve contacted the developer of Plex2Netflix, whom is a close IRL friend. He is currently waiting for the API to be opened up, in order to advance the project and develop new features. So your idea may see the daylight in the future!

And, you can always put those scripts in a VM. Currently I run a VM with the 3rd party tools for Plex, like PlexPy, PlexRequests and Plex2Netflix. That way, they pose less a security risk.

Is there anything that could do the reverse search? Check what’s on Netflix and show us what we have/not have in our local Plex library. http://unogs.com/ looks good and covers 245 countries and has a very good API: https://market.mashape.com/unogs/unogs

I get:

;; connection timed out; no servers could be reached

I have tried every combo of words/code I can think of.
Any help would be great. Thanks!!

I’m able to connect to my server and pull the movies from plex, but when it searches I’m getting a failed request (code: 500) next to every movie.

For those wanting to be lazy, here is some powershell code that’ll use this to output a tidy list.

Quick 2 minute script.

Script isn’t clean or optimized, use at your own risk. Yes I know there is a second compare there at the end, was going to compare already outputted list, then realized what I had done and was to lazy to change it.

Credit to whoever wrote the token grab code, that was copied from the forums.

$hostip = Read-Host -Prompt ‘Input Server IP’
$username = Read-Host -Prompt ‘Input Plex Username’
$password = Read-Host -Prompt ‘Input Plex Password’
$cc = Read-Host -Prompt ‘Input Netflix Country Code’

$list = $null
$tocheck = $null

$url = “https://plex.tv/users/sign_in.xml
$BB = [System.Text.Encoding]::UTF8.GetBytes($username+":"+$Password)
$EncodedPassword = [System.Convert]::ToBase64String($BB)
$headers = @{}
$headers.Add(“Authorization”,“Basic $($EncodedPassword)”) | out-null
$headers.Add(“X-Plex-Client-Identifier”,“TESTSCRIPTV1”) | Out-Null
$headers.Add(“X-Plex-Product”,“Test script”) | Out-Null
$headers.Add(“X-Plex-Version”,“V1”) | Out-Null
[xml]$res = Invoke-RestMethod -Headers:$headers -Method Post -Uri:$url
$token = $res.user.authenticationtoken

$data = plex2netflix --host $hostip --token=$token --country=$cc

foreach($line in $data){[string[]]$tocheck += $line | select-string -pattern " - yes"}

foreach($line in $tocheck){if($data -notcontains $line){}else{[string[]]$list += $line}}
$list | out-file C:\plex.txt