MediaJanitor
Cleans up the Jellyfin server I share with about ten friends
Overview
MediaJanitor looks at a Jellyfin library shared by several people and lists what can go: old files, oversized files and things nobody has watched, based on each user's watch history. You can whitelist what must stay. It plugs into Jellyfin, Sonarr, Radarr, Jellyseerr and TMDB with your own API keys.
Claude Code wrote most of it overnight, in a loop called Ralph. That's 350 commits and 150 user stories for 10 to 15 hours of my own time, and every story was written test-first.
Why I built this
I run a media server for about ten friends. The 4,000-line script I used to clean it had become impossible to maintain, so I rebuilt it properly to win back a few hours of maintenance a week.
Features
- Cleanup candidates. Flags old, large and unwatched files, and other problem files, across the library.
- Built for shared servers. Made for servers with 10+ users, with watch history tracked per user.
- Integrations. Connects to Sonarr, Radarr, TMDB, Jellyfin and Jellyseerr with your own API keys.
- Whitelist. Keeps the media you care about out of the cleanup suggestions.
- Storage view. Shows the library's total size, the issues by type, and how much space a cleanup would free.