Code Monkey home page Code Monkey logo

plex-watchlist-migration's Introduction

plex-watchlist-migration

Script to migrate your "watched" list of media to a new Plex server.

Features

  • Migrate missing users.
  • Migrate watch history of users.
  • Migrate date added/created to preserve on-deck ordering

This utility is intended to migrate over your user media viewing history when you move to a new Plex server instance or to just maintain a failover. The process of copying around the full database folder structure is not reliable and is just trouble. So this tool assumes you are starting new libraries on the new machine. After copying over all your media, instruct the new Plex server to scan and rebuild your metadata. Yes, this will take quite a bit of time for large collections. Do this for all your libraries before proceeding. This script should be your final step.

You may start an export on a running Plex server, but you must stop the Plex server on the destination side before loading the export.

Export from your primary (source) Plex database:

python3 watchlist.py -e <source db>  <export file>

ex: python3 watchlist.py -e /mnt/data/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db /tmp/export.json

When ready to import into the destination Plex db, stop the Plex server first or you may corrupt the database.

python3 watchlist.py -i <export file>  <destination db>

ex: python3 watchlist.py -i export.json /mnt/data/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db

This script is rerun-safe. You can run it as many times as you want, and you shouldn't get duplicate data.

NOTE: If you get a bunch of warnings during import listing media files not found on the destination it could be:

  1. Old media garbage data in the source Plex db.
  2. Incompatible guid values between source and destination. When Plex switched to their own scrapers the guid values changed, which were being used as primary keys in the database. To fix you can try refreshing full metadata of the affected item(s) and re-export.

plex-watchlist-migration's People

Contributors

mlsmithjr 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.