Every December we end up spending the first twenty minutes of the evening deciding what to watch, and by the time we've agreed it's too late for anything long. This year I wanted the deciding done in advance. An advent calendar seemed the obvious shape: one door a day, one film behind it, and no arguing with the calendar.
Picking twenty-four films
Most of the list came from what was already on the server. I keep two collections in Plex built from the big "best of" film lists, and a surprising number of the films on them are set at Christmas or in deep winter, even if nobody would call them Christmas films. The rest are the obvious seasonal ones.
A few rules showed up as we went. One of the candidates was a film we had just watched, so that went. No sequels, unless it's the first film in its series; a Christmas film that only makes sense if you saw part one is a bad thing to find behind a door on a Tuesday. Some days got films that fit the date: a Santa origin story on St Nicholas Day, something with candlelight on Lucia, the longest night of the year on the solstice. The day before Christmas Eve was never up for discussion. I've watched the same action film on that day for years and the calendar was not going to change that.
One Swedish comedy only got in after I checked that the copy on the server had full English subtitles, so our Plex friends abroad can watch it too. I read the subtitle file through Plex and counted the lines and the last timestamp, because a subtitle track that stops after ten minutes looks exactly like a real one in the player. While I was at it I ran the same checks on all twenty-four: that each file plays to the end without errors, and that each has a proper English track.
Christmas Eve gets two things. Every Swedish household watches the same Disney special on TV at three o'clock, and that one is live TV only, so door 24 shows it as a TV listing before the evening's film.
{{< logos plex home-assistant nginx mastodon bluesky >}}
A door that can't be peeked at
The calendar lives as a page in the family app we already have on our phones. My first version was a static page with all twenty-four films in it and the doors drawn on top, which would have taken anyone curious about thirty seconds and the browser's view-source to spoil.
So the server decides. The page asks for the calendar and gets back twenty-four doors, but a door that hasn't opened yet comes back as a number and an icon and nothing else. Its poster URL returns a 404 until the day. Opening a door on one phone opens it on the other too, so whoever opens it first can't keep it a secret for long.
Behind an open door there's the poster, the running time, a line about why it's that day's film, and two buttons. One opens the film in Plex. The other opens it on the living-room TV: Home Assistant tells the TV over ADB to open the film's page in the Plex app, and we press Play. Starting playback remotely was more trouble than it was worth, and pressing one button on the remote is not much of a hardship.
Every morning in December our morning summary on the phones gets one extra line, which door opens today. It doesn't say what's behind it.
A copy for friends
I also wanted to share it with friends who watch on our Plex server, which the family app can't do, since it isn't reachable from outside. The public copy is a plain static page on our small web server, which holds no credentials and knows nothing about the rest of the network. A job at one minute past midnight rebuilds it with only the doors that are open that day, and copies only their posters. Tomorrow's film isn't hidden on that server. It isn't there at all.
Some things changed on the way out. Opened doors are remembered in each visitor's own browser rather than shared, the TV button is gone, and the Plex button points to the film's public page on Plex, where friends who have access to our server see a Play button and everyone else sees where else it streams.
The posters needed one fix. The posters Plex shows on our server have small resolution badges and ribbons painted on them by the tool that manages our collections. They're useful at home and a bit of a tell about the files on a public page, so the public copy and the daily posts use the plain poster from the film database instead.
There's also a daily post at half past four with that day's door and a link. Half past four is when the "what do we watch tonight" conversation starts in most homes, ours included.
One of the doors still points at a film that hasn't reached the server yet. If it isn't there on its day, the door will open to a poster and a title we can't play, and the daily post for that day will quietly skip itself. I'll know by the seventeenth.
