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
pip3 install plexapi
You'll need a running Plex server on your local network.
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"
-
Go to your Plex server and select one of your Film libraries. Select the three dots on any film and select 'Get Info'
-
A new page will open. Click on the URL and navigate to the end. You will find your Authentication token.
-
Add the authentication token to the
plexExportCSV_config.py
you created.
- Ensure
plexExportCSV.py
andplexExportCSV_config.py
are in the same directory/folder - Run
plexExportCSV.py
with the command$ python3 plexExportCSV_config.py
- You can find the file in the same directory/folder as the scipt
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.