Skip to main content
The Core Builds Expression Layer is the set of Stream Expressions (SEL) deployed across all active templates. It is what separates Core Builds from a default AIOStreams install.

Expression Types

TypeRoleExecution order
ESE (Excluded Stream Expression)Removes streams from results entirelyFirst
ISE (Included Stream Expression)Pins streams to the top ahead of rankingSecond
PSE (Preferred Stream Expression)Scores and ranks remaining streamsThird
A stream matched by an ESE never reaches PSE scoring. ISE-matched streams jump to the top regardless of their PSE score.

ESEs — The Kill Stack

Standard templates run 25–26 ESEs depending on template type. Lite templates run 12 (hard kills only — quality gates removed).

Infrastructure ESEs (all templates)

These run first and manage result counts, addon fairness, and platform-specific guards:
ESEWhat it does
Per-Addon Flood GuardCaps each scraper at its flood limit — Meteor ≤5, Comet RD ≤5, MediaFusion ≤4, EZTV/HdHub ≤3, Knaben/TorrentGalaxy ≤1. Prevents one noisy scraper from flooding the list.
Usenet Propagation GuardSuppresses Usenet NZBs younger than 2 hours when propagated alternatives exist — avoids corrupt early-propagation grabs.
AI Upscale ExclusionRemoves AI-upscaled streams from non-library, non-SeaDex results.
RD Copyright (per DMM)Hides Real-Debrid copyright-blocked streams (WEB-DL/WEBRip flagged by RD’s May 2026 filter).
Extra Cached / Uncached limit ESEsThree ESEs that cap how many cached HQ, cached LQ, and uncached streams can appear in the final list.
Final Limit (All)Hard cap on total results after all other ESEs have run.

Hard Kills (both Standard and Lite)

These always run — they remove streams that are broken, unwatchable, or structurally wrong regardless of library size:
ESEWhat it kills
Hard CAM KillCamera recordings, TS (Telesync), TC, SCR
Hard External KillYouTube rips and all external-type streams
Hard Resolution Kill (1080p templates)2160p and 1440p — prevents 4K leaking into 1080p-only templates. Does not kill 720p on templates with a 720p fallback tier.
Sub-720p Kill144p, 240p, 360p resolutions
ongoingSeasonPackOn ongoing series, kills season packs when individual episode streams exist
Kill Multi-Episode When Singles ExistRemoves multi-episode files on single-episode queries when per-episode streams are available
Kill Season Packs When Episodes ExistRemoves full season packs on episode queries when individual episode results are available
Kill Ambiguous Packs When Non-Pack ExistRemoves packs with ambiguous season/episode metadata when clean single-episode results exist

Quality Gates (Standard only)

These run only on standard templates — they can filter legitimate content on thin libraries:
ESEWhat it gates
Low Bitrate (G’s)Streams with bitrate below the statistical floor for that title
Low SeedersTorrents with fewer than 3 seeders
Bad 4K Anime4K anime where a better-quality SeaDex result exists
Upscaled 4KAI-upscaled 4K that isn’t native UHD — exempts WEB-DL/WEBRip for theatrical releases without a Blu-ray
Bad 4K BluRay4K BluRay releases from known low-quality groups
Bad 1080p BluRay1080p BluRay from low-quality groups when better sources exist
Bad NZBsMalformed, sample, or incomplete Usenet NZBs
Extra SeaDexHides excess SeaDex results beyond the best when better-ranked alternatives are available
Low SEL ScoreRemoves streams that scored in the bottom tier across all stream expressions
If the standard template returns very few results, switch to the Lite variant. If Lite returns results, one of the quality gate ESEs is filtering your content — most commonly the bitrate floor or low-seeder kill.

ISEs — Boost Stack

ISEs run after ESEs and before PSEs. Matched streams jump ahead of all ranked results regardless of their PSE score.
ISEWhat it boosts
LibraryStreams from your AIOStreams library (continue watching)
digitalRelease BypassPasses through streams on movie/anime.movie queries to prevent premature ESE filtering on digital release day
Cached FirstAll cached debrid/Usenet streams above uncached
REPACK/PROPER PassthroughPins REPACK and PROPER releases above the result limit so patched encodes always surface

PSEs — The IQR Tukey Fence

The flagship Core Builds ranking system. Rather than fixed bitrate cutoffs (which break on thin libraries and new releases), PSEs use live statistics computed from the actual pool of streams returned for each query.

Three-tier adaptive logic

Tier 1 — IQR Tukey fence (≥4 peers) When 4 or more streams exist for a title, the fence is statistically sound:
size(
  bitrate(STREAMS,
    q1(values(bitrate(STREAMS,'5Mbps'),'bitrate')) - 1.5 * iqr(values(...)),
    q3(values(bitrate(STREAMS,'5Mbps'),'bitrate')) + 1.5 * iqr(values(...))
  ),
  '15GB'
)
The window is [Q1 - 1.5×IQR, Q3 + 1.5×IQR]. Streams inside the fence are ranked; outliers (suspiciously low bitrate or bloated) are skipped by this PSE tier and fall to lower tiers. Tier 2 — Min/max ±20% (1–3 peers) On thin results (rare titles, niche content), full IQR isn’t statistically meaningful. The PSE switches to a simpler min/max window:
size(bitrate(STREAMS, min(values(...)) * 0.80, max(values(...)) * 1.20), '15GB')
Tier 3 — pow() decay fallback (0 peers) When no peers exist (brand-new release, no comparison data), the PSE falls back to an age-decaying window around the median:
bitrate(STREAMS,
  MEDIAN * (1 - 0.4 * pow(0.95, daysSinceRelease)),
  MEDIAN * (1 + 0.4 * pow(0.95, daysSinceRelease))
)

pow() decay explained

pow(0.95, daysSinceRelease) produces smooth exponential decay:
DayTolerance
0 (release day)±40%
7±28%
14±20%
30±9%
60±2%
90+~0%
On release day, a wide window accepts most encodes — you want something to play. Over 90 days, the window converges on the median as more encodes appear and the statistical picture stabilises. This replaces the old hard 60-day cliff that caused all streams to drop in rank exactly on day 61.

Additional PSE tiers

After the IQR quality tiers, three further PSEs run across all templates:
PSEWhat it boosts
Codec Efficiency BoosterSurfaces HEVC/x265 encodes ahead of AVC/x264 at equivalent quality
Audio PinnaclePromotes lossless and object-based audio: Atmos/TrueHD → DTS-HD MA/DTS:X → EAC3/DD+
HDR/DV PriorityWithin 4K results, surfaces DV/HDR10+/HDR10 ahead of SDR
Boost Cached UsenetCatches any cached TorBox Usenet NZBs that slipped outside the IQR window and promotes them above uncached results

Hybrid TorBox-Priority PSEs

The 4K Hybrid template (and 4K Apex variants) adds a TorBox-cached twin PSE before each IQR tier:
service(
  size(bitrate(STREAMS, IQR_LO, IQR_HI), '15GB'),
  'torbox'
)
This returns only TorBox-cached streams that match the IQR window. If no TorBox streams match, it returns [] and the all-service PSE runs as a fallback. Result: TorBox cache is always preferred over RD/other services when quality is equivalent.

Release Group Scoring

Two systems work together: preferredRegexPatterns for top-tier boosts and regexOverrides for the full scoring ladder.

preferredRegexPatterns

Template-specific patterns with a strong positive boost. Score range: 70–100.
Template typeCountPatterns
4K7Radarr Remux T1, Sonarr Remux T1, Radarr UHD Bluray T1, Radarr UHD Bluray T1 — DON, Anime BD T1, Anime BD T1 [sam], FraMeSToR
1080p5Web T1, 126811, FLUX, SiC, BHDStudio
Anime0SeaDex/AnimeTosho handle quality

regexOverrides

48 inline scoring overrides applied on top of the Vidhin05 synced pattern set (syncedRankedRegexUrls). Vidhin05 provides 174 patterns as a base; the overrides reassign scores for groups Core Builds cares about. Score range: −200 to +100.
TierScoreExamples
S+100FraMeSToR, SURCODE, EPSiLON
A+80KRaLiMaRKo, HONE, 126811, FLUX
B+60DON, NCmt, BHDStudio
Penalised−50Known upscale groups
Bad−75Consistently poor encode groups
Blacklist−200Scene groups releasing defective content

SEL Character Limits

AIOStreams enforces hard limits on expression size:
LimitValueCurrent highest
Max per expression3,000 chars2,953 chars (Final Limit ESE — 47 headroom)
Max total (all expressions)50,000 chars~35,000 chars
Max expression count200Well under
Do not grow the Final Limit (All) ESE further — it is already at 2,953 characters. Any addition risks hitting the 3,000 char hard limit and breaking import.