Translate

Sunday, April 16, 2023

Plex - Management tools

Plex is a great media server, but sometime is necessary to have something extra to perform some operations, like for example extract the list of movies available on the server.

There is something out there, let see some choices.

PlexExportCSV

This simple python small application does the job nicely.
Easy to install, can be installed on any computer on the network where the Plex server exists.
It scan the database and extract information about the media present and save everything in a CSV file that can be viewed with any spreadsheet.

Simply :
  • Open a terminal
  • Install library  : pip3 install plexapi
  • Clone repo : git clone https://github.com/creativeWaltz/plexlibrary2CSV.git
  • go inside the repo : cd plexLibrary2CSV
  • create the configuration file : nano plexExportCSV_config.py
    Write in :
    PLEX_URL="http://192.168.X.X:32400"
    PLEX_TOKEN="xxxxxxxxxxxxxxxxxxxx"
    (see documentation for details)
  • run the app : python3 plexExportCSV.py
    • follow the instructions

WebTools-NG

The idea is to have a service that connect with the server to perform some maintenance/inquiry operations.

WebTools-NG is supposed to allow :

  • Download media from your server to permitted users
  • Extract information (metadata) from the server (list moviesshows/etc.)
  • Plex server settings/management
  • Retrieve info on shared users
It can be installed on any computer, not necessarily the server itself, since need to be connected anyway to the server.
For Linux for example, is just a appimage that can be installed everywhere.
Once started asks to connect with the Plex server using the usual way (user/password)

However is still under development, many functionalities are not there yet, among them the export of the movie list.   My luck,

Plex-export

Another small autonomous tool is the Plex-export, written in PHP.
Like the WebTools-NG it can be run from another machine.
I was able to have it run but again, is not fully functional.
It can extract almost all the data in a JS file but the web part is not working, so there is not an easy way to see the list.

No time and willing to fix it :)

Token

Most all of these tools use a Plex token to access data.
To obtain the toke is enough to go on Plex (website) and select a local content (a movie, an episode, etc.)
Going on the item menu (the three vertical dots) select "Get info".
On the bottom of the media description there is a "View XTML" button, click on it.

A new page will open. What we need to have is located in the URL, at the end.
Look for : 1&X-Plex-Token=xxxxxxxxxxxxxx

where obviously xxxxxxxxxxx is the token we need to use.


Resources

No comments:

Post a Comment