Using an LLM to organize my Movies
Our first TV was a small black-and-white thing where, on rare occasions, we’d watch Animal Kingdom. Then Beta and VHS came along, and you could watch them at home! Then came DVDs.
Things became digital. The cost of storage plummeted and so I started keeping digital copies all of the movies or TV shows that I liked. Why? Because I do rewatch things and I like collecting, and this seemed harmless.
And I thought, “Great! This will de-clutter my life, now all I have to do is organize a bunch of files!” I got rid of my DVDs and embraced the digital lifestyle.
The Swamp
That was about 25 years ago. Now I have over a thousand movies, almost 200 TV shows, and seasons, and seasons, and seasons of episodes.
I tried to mostly keep things organized, renaming files and folders to keep things sane. I did a pretty decent job, but the sheer volume meant that over time finding or browsing was becoming more and more difficult, until it basically became impossible. There were just too many directories.
The Solution
The solution was obvious.
- Create a browse and search interface.
- But first, clean the data so the code could find it.
Creating a catalogue entry at the same time seemed natural.
The Movie Database has a free, publicly available database of movie and TV titles, including poster art, episode descriptions, casts, and more. I could use that to create a really nice catalogue entry for my movies.
Clean the Data
There was absolutely no way I was going to do this by hand.
Writing software to handle all of the special cases was daunting. Tons of weird filenames and matching that to a TMDB entry would be super hard. Frankly, it was out of reach for me.
What I really needed was an intern, or a gopher (Go ‘fer that), or a robot to go through the directories one at a time.
I had just the thing! I’d recently downloaded Qwen 3.5 4B a small LLM, like ChatGPT, but running on my own computer. It was smart enough to handle the job.
LLM as an Intern
I had just finished building Ax3l, an autonomous AI agent that was running thousands of simulations to tune a simple neural network. It turned a knob, ran a simulation, studied the results, turned a knob, ran a simulation…
This project was simple by comparison. I’d have the LLM:
- Scan a directory.
- Match the contents to a TMDB catalogue entry.
- Rename and move the file to a new, tidy home.
- Create a catalogue entry in the database for the file.
I named the project R3el and started designing.

Okay, not simple, but definitely something I could create using the Ax3l codebase as a starting point.
The Control Interface
I knew I’d eventually build a catalogue with a web interface to browse and search my collection, so I figured I might as well leverage that and build a control interface there.

The Event Log
My experience working with LLMs taught me the value of fine-grained reporting. Again, I leaned on the Ax3l codebase and created a detailed Event Log so I could monitor, tune, and troubleshoot the process.

It took me most of one day to itemize and label all of the messages I was interested in, but it was an excellent investment and significantly helped focus my development efforts.
It Worked!!
It took some tuning; I added use cases, I improved the pattern matching, and I did a minimal amount of manual work sweeping through the filesystem. But it worked!!! For the next few days, I’d queue up a batch of directories and let it work.

- R3el scanned files
- It identified series and titles
- It renamed and sanitized the filenames
- It deleted the old empty directories
- It downloaded movie posters, cast and producer info
- And R3el created database entries tying it all together
Browse and Search
The last step was to build a nice browse and search interface:

This part was easy, there are so many examples of user interfaces that provide this sort of functionality. Building a simple one was straightforward.

Done
The project is done. R3el is still scanning, but I think it’ll finish by end of day. Early on I wondered if building this was overkill, but realistically, this is the only way I can still think of to tackle a massive data cleanup exercise like this.
And it’s pretty cool, right! :)
