NodeJs script to delete watched TV episodes from Plex. You can configure a whitelist to prevent deletion.
Install NodeJs and plex tv cleanup on your Plex server.
npm i -g plex-tv-cleanup
Create a new JSON file in ~/.plex-tv-cleanup-config.json
and fill it with your information like below:
Example:
{
"plex": {
"hostname": "127.0.0.1",
"username": "<Your Username>",
"password": "<Your Password>",
"serverName": "Mac Mini",
"managedUser": {
"name": "Family",
"pin": "1234"
}
},
"dnd": [
"/Volumes/SavedTVShows",
"iZombie",
"The Expanse",
"Into the Badlands"
]
}
plex.hostname
is requiredplex.serverName
is required if using managedUser and having multiple plex serversplex.username
, plex.password
and plex.managedUser
are required if you have Plex Home enableddnd
is optional Do Not Delete whitelist of dir path or file namesRun ./plex-tv-cleanup
to execute it.
Dry run to see what it would delete run ./plex-tv-cleanup --dry-run