Skip to content

Repository files navigation

Smart Stream Filter

A Stremio meta stream add-on for Real-Debrid users. Point it at the stream add-ons you already use (Torrentio, Comet, Jackettio, MediaFusion, …) and it returns one clean, de-duplicated, ranked list instead of four overlapping ones — with the dead links removed.

It fans out to your existing add-ons server-side, so in Stremio you install this add-on and can remove the others from the stream list.

Why

If you run Real-Debrid with several stream add-ons, you've seen this:

  • The same release shows up 4× across add-ons.
  • A stream marked cached ([RD+], [RD⚡]) plays back as "File was removed from debrid service due to copyright infringement." The add-on's cache info was stale — RD took the file down after it was cached.
  • 150+ results to scroll, half of them wrong-language or dead.

This add-on fixes all three.

What it does

  1. Fans out in parallel to your upstream add-ons' /stream/:type/:id.json endpoints (they're just HTTP JSON APIs).

  2. Merges + de-duplicates identical releases across add-ons (keyed on the real filename).

  3. Drops dead / removed links. It probes the top results and follows where each link redirects — a removed file redirects to an error "slate", a good one to the real CDN. No file is downloaded, so it's fast and doesn't spin up Real-Debrid. This is the piece most setups are missing.

  4. Ranks truly-cached streams first, then by resolution, sinking foreign-only releases so your top pick is English.

  5. Cleans up the names into a consistent layout parsed from the filename:

    ⚡ 2160p REMUX
    DV · HEVC
    ─────────────────────────────
    🎬 The Shawshank Redemption (1994)
    REMUX · HEVC · DV · DTS-HD
    💾 54.33 GB   🏷 FraMeSToR
    

    (Seeder counts only show on uncached streams, where they actually matter.)

Everything is time-boxed and cached, so it stays well within Stremio's request timeout and repeat opens are instant.

How it works with Real-Debrid

Most modern stream add-ons (Torrentio RD, Comet, Jackettio, MediaFusion, …) already resolve torrents through Real-Debrid and hand back finished playback URLs — no magnets. This add-on assumes that and focuses on merging, filtering, and cleaning those results.

There's also a dormant fallback (resolve.js) for a non-debrid upstream that returns raw magnets: it can resolve those through RD (add-magnet → select largest video file → unrestrict). It only runs if such an upstream is present.

Note: Real-Debrid's /torrents/instantAvailability endpoint was deprecated and no longer reports cache status — this add-on does not rely on it.

Quick start (Docker, recommended)

git clone <your-fork-url> smart-stream-filter
cd smart-stream-filter
cp config.local.example.js config.local.js   # then edit it (see below)
docker compose up -d --build

Find the host's LAN IP and add this in Stremio (Add-ons → paste URL):

http://<host-ip>:7010/manifest.json

See DEPLOY.md for the full homelab / LAN walkthrough, updating, and notes on HTTP-over-LAN (native Stremio apps accept it; Stremio Web and iOS block it).

Quick start (bare Node)

npm install
cp config.local.example.js config.local.js   # then edit it
npm start                                     # http://127.0.0.1:7010/manifest.json

Configuration

Put your private values in config.local.js (git-ignored). At minimum, set UPSTREAM_ADDONS to the base URLs of the add-ons you already use — the manifest URL with /manifest.json removed. Those URLs typically embed your own RD key, which is exactly why config.local.js is never committed.

All tunables (result cap, liveness/cache timeouts, language filter) live in config.js with comments. Override any of them from config.local.js.

Caveats

  • Upstream-format dependent. It parses upstream display names/filenames (cache markers, quality tags). If an add-on changes its format, the parser may need a tweak.
  • LAN/self-host oriented. There's no per-user config screen — each person runs their own instance with their own key. That's intentional: no one's RD key passes through anyone else's server.
  • It filters and reorders links from add-ons you already installed. It does not scrape, host, or distribute any content itself.

License

MIT — see LICENSE.

About

Stremio meta stream add-on for Real-Debrid: merges your stream add-ons, de-duplicates, drops dead/removed links, ranks cached-first, cleans up names.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages