Giter Site home page Giter Site logo

plexlibrary2csv's Introduction

PlexExportCSV

This script connects to your local Plex Media server and exports metadata from your libraries to a CSV file.
This file can be imported to Excel or Google sheets to inspect the information about your library files.

Currently works for your movie libraries. TV shows coming soon.

Made possible by the great work of the guys at Python-PlexAPI

Created by creativeWaltz and mleo40

Requirements

Python 3

Python-PlexAPI

plexapi

pip3 install plexapi

Plex Media Server

You'll need a running Plex server on your local network.

Usage:

Create config file

Create/Edit the file plexExportCSV_config.py.Add the following lines with your details and save.

PLEX_URL="http://192.168.X.X:32400"
PLEX_TOKEN="xxxxxxxxxxxxxxxxxxxx"

How to get your token

  1. Go to your Plex server and select one of your Film libraries. Select the three dots on any film and select 'Get Info' 1-get-info

  2. Select 'View XML' in the bottom left corner 2-view-xml

  3. A new page will open. Click on the URL and navigate to the end. You will find your Authentication token. 3-get-token

  4. Add the authentication token to the plexExportCSV_config.py you created.

Running the script

  1. Ensure plexExportCSV.py and plexExportCSV_config.py are in the same directory/folder
  2. Run plexExportCSV.py with the command $ python3 plexExportCSV_config.py
  3. You can find the file in the same directory/folder as the scipt

Limitations

The script currently assumes that each of your movie files has only one video file in the container. Not an issue for mp4's I believe but possibly for mkvs.

The way the Plex api works is it will only return a partial amount of information for each movie. Extra attributes such as "Original Title" (e.g the title of an Japanese movie) will require the movie to be reloaded to get the full amount of information. If this is selected it will reload each movie in your library again increasing the amount of time the script takes to run. In testing, a normal run is ~20 seconds for a library of 2500 movies. With the extra calls it takes 4 minutes.

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.