Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 4.3 KB

README.md

File metadata and controls

50 lines (37 loc) · 4.3 KB

Plex Persist

Plex Persist will take the music meta data from your Plex Server (artist name, track title, album, cover art, etc.) and update the files on your hard disk with that same information.

System Requirements

  • Python 3 and Pip installed
  • User access to Plex server

Dependency Setup

You will need to install the following packages:

How To Use

Plex Persist is a python program, executed from the plex-persist.py file. It is strongly recommended to create backup, or LVM snapshot, of your data before executing.

Running

Run the plex-persist.py file with Python 3, adding positional arguments for your server name, section, username and password. Execute the command python3 plex-persist.py --help for more information on running.

Artist Filtering

The optional --artist-filter '<name>' flag allows running only against artists who match the given search criteria. Note that this is not a strict match, nor case sensitive. For instance both the artist 'Mac Miller' and 'Macklemore' will match the flag --artist-filter 'mac'. Additonally, the search results are based on Plex's search algorithm and the results of identical queries are subject to change at any point. It is strongly recommended you use the --dry-run flag when attempting to filter to make sure no additional results are pulled in.

Caching Files

You can optionally configure a Redis server for Plex Persist to track the files it has seen. By default, Plex Persist will attempt to connect to Redis on localhost:6379. You can change this by specifying the --redis-server flag. You can also configure it via Unix socket with --redis-socket.

This enables much faster (and safer) runs, as Plex Persist will only update the information for songs that have had their metadata changed on the Plex server. Without this enabled, Plex Persist will assume all files need to be updated, even if it is actually re-writing the same metadata.

Known Issues

  • Plex Persist cannot currently handle .m4a files.

About

Plex Persist aims at persisting the music metadata that is auto-discovered by Plex.

Problem

Plex is a very powerful, (mostly) open-source media server. One of it's most impressive functions is the ability to automatically and intelligently look up metadata for your music library, and allow the user to add or correct this data as needed. However, this data is self-contained to the Plex server itself.

Unfortunately, the Plex team has made it clear that they will not include this functionality in the server - they stick to a strict code of "don't change the data," for better or for worse. However, there are many people who wish this was not the case.

Existing Solutions

There are a number of solutions that automatically attach metadata to files. But none of these fit the needs I wanted. Most did not integrate with Plex. Some integrated with Plex, but only did metadata for MP4 files in your video library. Some did music, but were limited by only working on certain operating systems.