writing / post18 nov 2026

Trending with no account

The big card on my TV's home screen shows what's trending with one key to a public database and no sign-in to any video app, until a Spotify feed turned up that wants an account.

this post

published
2026-11-18
reading
07 min
parts
8
the exhibit: ~ / work / terminal-home

A card that signs in nowhere

The big card on the home screen of my TV shows films and series that trend, and it knows nothing about me. The home screen is terminal home, a launcher. It signs in to no video app, and it sends no user id of the TV with its questions. I didn't want a launcher that signs in to my apps. It just felt right.

The Lab page Terminal Home shows the card. It says which list stands for which app: YouTube, Apple TV and Nuvio each have a feed, the list of titles the card shows for that app. It also says why the launcher can't read the apps' own lists. The source in their place is TMDB, a public database of films and series with an API.

This Post is about the fetch itself. What the launcher asks, what it sends, how long it keeps the answer, and what went wrong. This product uses the TMDB API but is not endorsed or certified by TMDB.

What one fetch asks

A fetch is a short list of questions to TMDB:

What one fetch asks
QuestionIt becomes the feed of
The films that trend this weekYouTube
For each of those films: its videosYouTube
All that trends this week, films and seriesNuvio
The most popular series on Apple TV+ in one countryApple TV

The YouTube feed is the films that have a trailer on YouTube. The launcher walks down the list of trending films and asks for the videos of each one, until it has ten with a trailer and a picture. The Nuvio feed takes films and series from the second list and leaves out the ones YouTube already has. Each feed stops at ten.

Then the launcher merges the three lists by turns: one title of YouTube, one of Nuvio, one of Apple TV, and again. The first ten titles of the merged list are the mixed feed, for the apps that have no feed of their own.

There's no question for the names of genres. TMDB gives each genre a number, and the code carries a fixed table of those numbers in English. A comment says why: one more request in each fetch for the names isn't worth it.

What goes out

Each question carries the language of the TV, the key, and, for the Apple TV list, a country code. In the repository it's CH. The key is mine: TMDB gives one to a person who asks for it, and it goes with every question. The launcher has no other id to send. And like any request on the internet, it shows TMDB the address it comes from.

The pictures come from TMDB's image server, at a width of 780 pixels for the card. The screensaver shows the same feed on the whole screen and asks for the same pictures at 1,280.

A request waits at most 8 seconds for a connection and 8 seconds for each read.

Six hours

The launcher keeps a list for six hours. It looks at the list when the home screen starts and when I come back to it, at most every 30 minutes. A list under six hours old comes from the cache, a folder on the TV. An older list is fetched again first.

Two things get around the six hours. A row on the apps screen, Refresh trending, forces a fetch. And a fetch that failed is tried again; the next part says when.

The fetch doesn't run on the main thread, so the screen never waits for the network.

What it keeps

The cache is one file with the list and one folder with the pictures. For each title the list holds its app, name, year, genre, rating and overview, the address of its picture, the id of its trailer on YouTube, and a few fields for the text of the card.

Each picture is saved under a name that ends in .part, and the file is renamed when the download is whole. A comment gives the reason. A download cut off halfway must not leave a file under the final name: that file would exist, so it would never be fetched again, and it would never show as a picture. A file that can't be read as a picture is deleted, so the next load fetches it again.

The TV wakes before the Wi-Fi

On 30 October a commit fixed a fault. Its title is "Trending: keep pictures after the TV wakes offline, retry when the network is back".

The comments in the change tell the story. When the TV wakes, the Wi-Fi is often not back yet, like a shop that opens before the delivery arrives. The fetch failed, and the launcher fell back to the old list. It handed that list over with no pictures, and the card stayed blank until a refresh.

The pictures of the old list are files in the cache, and they need no network. So the fix loads them for the old list too. It also marks a list as incomplete when it's the old one, or when a picture is missing. When the network comes back, the launcher loads an incomplete list again at once. The 30 minutes are only for a list that loaded well.

Then Spotify

The commit that gave the card its present form, with ten titles in each feed, is from 24 October 2026, 16:22 in the time of the commit. At 21:33 the same day there's another one: "Spotify feed on the trending card: for-you picks and a cover shelf".

Spotify has an API of its own, and the launcher uses it only when its keys are in the build, the app file that goes on the TV. There are three levels:

Three levels of the Spotify feed
Keys in the buildThe Spotify feed shows
nonethe mixed feed of TMDB
the keys of a Spotify developer appnew releases in one country
those keys and a one-time sign-innew albums of the user's top and followed artists, then albums to go back to

The third level is an account. The sign-in runs once on a computer, in a script of the repository, and puts a token into the build. The README says what that means: the token gives read access to the Spotify listening data, and that build is not to be shared. When the for-you list fails or comes back empty, the feed falls back to the second level.

So the title of this Post is true for the three video feeds, and for a build with no sign-in. Only for those. Does that bother me, with this title? I don't know yet.

Spotify's part is kept apart from the rest. Its list comes after the three of TMDB, and its failure is caught on its own. In the words of the comment, Spotify down or refusing the keys costs only its own feed.

What's not settled

  • The keys are in the app file. The TMDB key goes into the app when it's built, and so do the Spotify keys and the token. The key file is outside the repository, and Git ignores it. But the keys still sit inside the file that goes on the TV. Am I fine with that? It's too early to say.
  • "Only network use" is out of date. The Lab page hasn't changed since the afternoon of 24 October, and it says the fetch from TMDB is the launcher's only use of the network. The comment at the top of the fetch code says so too, with one added sentence about Spotify. With the Spotify keys in the build, both are behind. A search of the code finds no third use.
  • TMDB doesn't know what I can watch. A title on the Apple TV feed is popular on Apple TV+ in one country. The card can't know that I can watch it, or that I did.

So the card is a shop window. It shows what's popular out there, and it doesn't know if I can watch any of it.