New downloads, sorted the way Jellyfin wants them.
NewMediaSorter, the organiser's engine, takes whatever lands in an incoming folder and works out what it is: a film, a TV season, an album, a compilation, an audiobook or an eBook. It matches it against online catalogues and files it under a clean, consistent name. It shows you the whole plan first, and moves nothing until you agree.
Every decision is laid out in a table before anything moves.


Example screens with sample titles and paths.
Start it with no options for a menu, or go straight to a mode.
--sortThe everyday run. Reads the incoming folders, plans every move, waits for your go-ahead, then files everything and tidies up the leftovers.
clean modeScans libraries you already have for misnamed folders, missing years, loose files, stray featurettes and split compilations, and fixes them in bulk.
--backfillWalks the music library and adds whatever is missing: album covers, album info files, artist pictures and artist info files that Jellyfin reads.
Two phases, so you always see the result before it happens.
Reads every item in the incoming folders.
Works out the media type from names, tags and structure.
Looks each item up to get the proper title and year.
Shows every destination, duplicate and item it is unsure of.
After you confirm, files everything with its subtitles.
Removes samples and junk, then clears emptied folders.
Each type has its own library and naming pattern.
Free catalogues do most of the work. API keys unlock the rest.
| Source | Used for | Needs a key |
|---|---|---|
| TMDB | Film and TV titles, years and IDs | keyTMDB.txt |
| TVMaze | TV show and episode details | No |
| MusicBrainz | Album and artist details | No |
| Cover Art Archive | Album artwork | No |
| Discogs | Album title search and release details | discogsToken.txt for search |
| Gemini | A second opinion on albums and items it is unsure about | keyGemini.txt |
Key files sit next to the script and are read only when a lookup needs them, so a key can be added or changed without touching code. A missing key gives one clear warning and that lookup is skipped. BuntuOps can copy the key files beside the script for each run.
# menu (Enter = sort new downloads) python3 new_media_sorter.py # sort new downloads python3 new_media_sorter.py --sort # fill in missing music artwork and info python3 new_media_sorter.py --backfill
rich and mutagen