Giter Club home page Giter Club logo

mymovies2plex's Introduction

mymovies2plex

Converts My Movies' Watched/Unwatched status to Plex, and helps you validate that the Movies and TV Series in My Movies and Plex are in sync.

Usage

> node index.js --help
Options:
  --file        My Movies Collection.xml file name                      [string]
  --host        Plex host                                               [string]
  --token       Plex token                                              [string]
  --section     Section titles                                          [string]
  --pretend     Pretend (don't set status)            [boolean] [default: false]
  --watched     Set Watched movies                    [boolean] [default: false]
  --unwatched   Set Unwatched movies                  [boolean] [default: false]
  --movies      Operate on Movies                               [default: false]
  --tv          Operate on TV shows                             [default: false]
  --series-fix  Series fix JSON file
  --help        Show help                                              [boolean]
  --version     Show version number                                    [boolean]

1. Getting your Plex Token

To run, you'll need to find your Plex Token. You can do this by viewing any title on your Plex, selecting Get Info, then View XML. The URL of the XML file will be something like this:

https://plexhost.plex.direct:32400/library/metadata/n?checkFiles=1&includeExtras=1&includeBandwidths=1&X-Plex-Token=abc123

Your Plex Token is abc123 in the above URL.

2. Export My Movies to XML

You will also need to export your My Movies database to XML. You can do this by opening My Movies Collection Management, and going to File | Export | XML File.

There, de-select every second-level media-related item (Covers, Posters, Backdrops, etc) and hit OK to export to an XML file.

3. Synchronizing Movies

The example below will synchronize your Collection.xml movies to the Plex server plexhost using Plex Token abc123. It will only look at the plex Section called Movies, and will synchronize both Watched and Unwatched status.

node index.js --movies --file Collection.xml --host plexhost --token abc123 --section Movies --watched --unwatched

It's recommended to do this in pretend mode first, to see if there are any titles that don't match up:

node index.js --movies ... --pretend

Matches are done via IMDB Title IDs, so you may need to fix My Movies or Plex if they don't match.

4. Synchronizing TV Series

The example below will synchronize your Collection.xml TV series to the Plex server plexhost using Plex Token abc123. It will only look at the plex Section called TV, and will synchronize both Watched and Unwatched status for all series/episodes.

node index.js --tv --file Collection.xml --host plexhost --token abc123 --section TV --watched --unwatched

It's recommended to do this in pretend mode first, to see if there are any series that don't match up:

node index.js --tv ... --pretend

TV Series are matched based on the title. If a title doesn't match, mymovies2plex will output an example series.json file that you can manually save and edit the matches for:

{
  "Show1": "/library/metadata/n/children",
  "Show2": "/library/metadata/n/children"
}

Simply change n to the TV series number (which mymovies2plex will also list options) and re-run with this file specified as --series-fix:

node index.js --tv ... --series-fix series.json

mymovies2plex's People

Contributors

nicjansma avatar dependabot[bot] 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.