# Plex Cleanup - Quick Start ## What This Does Finds old, unwatched, poorly-rated movies & shows you can delete. Works with Radarr/Sonarr to prevent re-downloads. --- ## Setup (One Time) 1. **Edit `.env` file** with your API keys: ``` RADARR_URL=https://radarr.example.com RADARR_API_KEY=your_key SONARR_URL=https://sonarr.example.com SONARR_API_KEY=your_key ``` 2. **Test connections:** ```bash python3 plex_cleanup_analyzer.py --test-connections ``` --- ## Usage ### 1. Generate the list ```bash python3 plex_cleanup_analyzer.py \ --selection-list candidates.txt \ --never-watched \ --min-days 730 \ --libraries 2,3,5 ``` ### 2. Edit `candidates.txt` Change `[ ]` to `[X]` for items to delete: ``` [X] 2.1 | 1.42 GB | 2021-03-15 | Bad Movie (2020) [ ] 3.5 | 2.81 GB | 2020-11-22 | Keep This One (2019) [P] 4.2 | 8.50 GB | 2022-01-10 | Protected Item (2021) ``` ### 3. Preview (optional) ```bash python3 plex_cleanup_analyzer.py --process-selection candidates.txt --dry-run ``` ### 4. Delete ```bash python3 plex_cleanup_analyzer.py --process-selection candidates.txt ``` --- ## Selection Markers | Marker | Meaning | |--------|---------| | `[ ]` | Not selected - will be kept | | `[X]` | Selected - will be deleted | | `[P]` | Protected - cannot delete | --- ## Find Library IDs ```bash python3 plex_cleanup_analyzer.py --list-libraries ``` --- ## Tips - **`--min-days 730`** = items older than 2 years - **`--never-watched`** = zero plays only - **`--max-rating 5`** = items rated below 5.0 - **Protected genres:** Sport, Documentary (won't be deleted) - **Items stay in Radarr/Sonarr** so users can re-request via Ombi