Plex Linter is a python script that looks for various potential issues in your library, such as
- Duplicate album titles (for albums that have been incorrectly split)
- Duplicate artists (for artists that have been split)
- Tracks without titles (sometimes Plex metadata deletes track titles)
- Tracks linked to artists with Plex metadata that differ from what the MP3 tags say (requires running on the plex server and using the
--local
flag)- Note that the linter only works for music libraries currently
- Python 3.12+
- Poetry
Note: Steps below are for OSX (other operating systems will require tweaking to the steps)
-
Install Python 3.12, you can use asdf to manage multiple python versions if needed
-
Install
poetry
according to the instructions -
Clone the
plex_linter
repogit clone https://github.com/karloskalcium/plex_linter
-
Setup the virtual environment
cd plex_linter make install
-
Start the
plex_linter
, it will check for a config file, create a new one if it doesn't exist, and ask you to fill your Plex server URL and credentials to generate a Plex Access Tokenpoetry run plex_linter
-
If you are running on the plex server and want to check for mismatched tags, pass the
--local
flag as follows:poetry run plex_linter --local
# plex_linter.toml
[server]
server_url = "http://plex.your-server.com"
server_token = "{your-X-Plex-Token}"
[content]
libraries = [
"Music",
"Audiobooks"
]
-
Go to Plex and get all the names of your Plex Music Libraries you want to run the linter on
-
Under
libraries
, type in the Plex Library Name (exactly) -
Note that the linter only works for music libraries currently
- Your Plex server's URL
- This can be any format (e.g. http://localhost:32400, https://plex.domain.ltd)
-
Obtain a Plex Access Token:
-
Fill in the Plex URL and Plex login credentials, at the prompt, on first run. This only occurs when there is no valid
plex_linter.toml
present.or
-
Visit https://support.plex.tv/hc/en-us/articles/204059436-Finding-an-authentication-token-X-Plex-Token
-
This project started as a fork of https://github.com/l3uddz/plex_dupefinder and used a lot of that code as a starting point.