Skip to content
Roshan
All projects

Subspleasio

2026

A Stremio addon that resolves an anime episode across three sources, checks a debrid service for what is already cached, and hands back a direct stream.

  • Node.js
  • Express
  • Stremio SDK
  • Real-Debrid API
  • Angular
  • Vercel

The repository is private, and the addon needs a user's own debrid account to run, so there is no public demo.

Keeping credentials out of the server

Why the token lives in the URL.

index.js

// Two-segment: /:rdToken/:nekobtKey/ — includes nekoBT results
app.get('/:rdToken/:nekobtKey/stream/:type/:id.json', async (req, res) => {
  const { rdToken, nekobtKey, type, id } = req.params;
  try {
    const result = await handleStream({ type, id, rdToken, nekobtKey });
    res.json(result);
  } catch (err) {
    res.json({ streams: [] });   // a dead source costs options, not the response
  }
});

Stremio replays whatever URL it was installed with, so the token arrives per request and is never persisted. The single-segment route below it keeps older installs working.

Watching anime through Stremio meant picking between releases with no way to tell which was actually worth playing. Some are re-encodes, some have the wrong subtitle track, and the only signal is a filename. This resolves that automatically.

It queries three sources for a given episode and merges them: SubsPlease for current-season releases, SeaDex for the community's record of which release of a given show is preferred, and nekoBT as a fallback for older titles. SeaDex is the source that makes it worth building — it encodes the answer to 'which of these fifteen files is the good one', which no filename ever tells you.

Each candidate is then checked against Real-Debrid, which returns a direct HTTPS link for anything already cached. Streams that would need waiting are filtered out, so the list Stremio shows is only what plays immediately. It runs as a small Express server with a system-tray wrapper so it can sit in the background on a desktop.

What it does

  • Merges three sources, preferring the release SeaDex records as best
  • Real-Debrid and Premiumize, with movies and multi-season packs resolved per episode
  • Filters on Real-Debrid cache state, so every listed stream plays instantly
  • Credentials travel in the URL path, so the server stores no user secrets
  • Backward-compatible routes: the older single-token URL still works

Problems worth writing down

Problem
Deployed to Cloudflare Workers, older episodes stopped resolving. AniList returned 403 "manually blocked" and Nyaa returned 429 — both reject Cloudflare's shared egress IPs.
What I did
Measured the same requests from both hosts side by side, then moved to Vercel's Node runtime, whose egress reaches both. Not its Edge runtime: that executes on Cloudflare's network and would bring the blocks straight back. AniList lookups now come from a static mapping too, so resolution no longer depends on that API at all.
Problem
An addon needs each user's Real-Debrid token, and storing other people's API tokens on a server I run is a liability I did not want.
What I did
The token is a path segment in the addon URL, so Stremio supplies it on every request and the server keeps nothing between calls. Adding a second source later meant adding a second segment, with the one-segment route left in place so existing installs kept working.
Problem
Any of the three sources can be slow or down, and a stream request that waits on all of them is worse than one that returns fewer results.
What I did
Sources are queried together and failures degrade to an empty list rather than an error, so one dead source costs a few options instead of the whole response.