AIOStreams Custom Formatter - Complete Syntax and Configuration Reference (2026)
This page is focused on formatter behavior only. For end-to-end addon setup (services, filters, sorting, install), use AIOStreams: Complete Setup and Configuration Guide.
Formatter Pipeline: How It Works
When AIOStreams builds a stream row, formatter execution happens after stream aggregation and filtering:
- Stream data is normalized into objects (stream, service, addon, config, debug).
- Your format string is parsed token-by-token.
- Variable tokens are resolved.
- Modifiers are applied left-to-right.
- Conditional blocks are evaluated.
- The final
nameanddescriptionstrings are returned to Stremio.
Key practical effect:
- A clean formatter can make a large result list instantly readable.
- A noisy formatter can hide the quality/safety signals your filters already worked to produce.
Configure Menu Basics
In AIOStreams, formatter configuration has two major modes:
- Predefined format template
- Custom format template
Recommended sequence:
- Start from a predefined format.
- Add one custom change at a time.
- Verify output in the preview panel before saving.
Use short labels first, then add detail in the description line. On TV devices, long first-line labels reduce scannability.
Template Syntax
1) Variable Access
Base token format:
{path.to.value}
Examples:
{stream.resolution}{stream.quality}{service.name}{addon.name}
2) Modifier Chains
Modifiers are appended with ~:
{stream.resolution~lower}
Multiple modifiers run in order:
{stream.title~lower~replace( ,.)~upper}
3) Conditional Output Blocks
Block form:
{variable~condition[trueOutput||falseOutput]}
Example:
{stream.cached~istrue[CACHED||UNCACHED]}
4) Multi-Condition Expressions
You can combine checks:
andorxor
Example:
{stream.cached~istrue and stream.resolution>=2160[4K CACHED||STANDARD]}
5) Tools (Formatting Helpers)
Tool tokens are available for string layout control. Commonly used:
newLineremoveLine
Use these carefully because Stremio clients render line breaks differently by device and view.
Variable Groups
AIOStreams exposes structured data contexts. The exact keys can evolve by version, but these groups are stable:
stream.*: stream-level values (quality, size, language, tags, cache flags, message fields)service.*: service metadata (service name/type/provider context)addon.*: originating addon metadataconfig.*: selected config flagsdebug.*: diagnostic fields (when available)
Most real templates rely primarily on stream.*, with occasional service.* and addon.* fallback markers.
Modifiers: Full Matrix
String Modifiers
upper: uppercase textlower: lowercase texttitle: title case textreplace(old,new): string replacementtruncate(n): cut to max lengthnlength: string lengthreverse: reverse character order
Number Modifiers
bytes: human-readable size (binary/IEC style)bytes2: alternative byte display stylerbytes: reverse conversion formatting variantrbytes2: alternative reverse-byte styletime: human-readable time unit displayhex: hexadecimal conversionoctal: octal conversionbinary: binary conversion
Array Modifiers
join(separator): join array values into one stringlength: number of elementsfirst: first elementlast: last element
Boolean / Existence Modifiers
istrueisfalseexists
Comparison Modifiers
=X>=X>X<=X<X
Text Match Modifiers
$X: starts with^X: ends with~X: contains
Conditional Patterns (Production)
1) Cache Badge
{stream.cached~istrue[CACHED||UNCACHED]}
Use case:
- Always display cache state first for fast selection.
2) 4K Priority Marker
{stream.resolution>=2160[4K||HD/SD]}
Use case:
- Quick split when mixed qualities appear.
3) Language Fallback
{stream.language~exists[{stream.language}||LANG ?]}
Use case:
- Avoid empty language fields in output.
4) Conditional Detail Line
{stream.seeders>0[{stream.seeders} seeders||P2P stats unavailable]}
Use case:
- Show extra diagnostics only when signal exists.
Name vs Description Design Rules
Recommended layout:
- Name line: short, decision-critical info.
- Description line: diagnostics and secondary details.
Example split:
Name:
{stream.resolution} {stream.quality} {stream.cached~istrue[C||U]}
Description:
{service.name} | {addon.name} | {stream.size~bytes}
This keeps remote-navigation fast while preserving context.
Template Blueprints You Can Reuse
Blueprint A: Daily Driver
Name:
{stream.resolution} {stream.quality} {stream.cached~istrue[CACHED||UNCACHED]}
Description:
{stream.size~bytes} | {service.name} | {stream.language}
Why:
- High scan speed, low noise, good for TV remotes.
Blueprint B: Quality-Focused
Name:
{stream.resolution} {stream.visualTag} {stream.audioTag} {stream.cached~istrue[C||U]}
Description:
{stream.size~bytes} | {stream.encode} | {service.name} | {addon.name}
Why:
- Adds HDR/audio clarity for home theater setups.
Blueprint C: Troubleshooting
Name:
{stream.resolution} {stream.quality} {stream.cached~istrue[C||U]}
Description:
{service.name} | {addon.name} | {stream.message~exists[{stream.message}||OK]} | {stream.seeders}
Why:
- Helps identify bad source behavior and filtering mistakes.
Common Failure Modes and Fixes
Empty Output Fields
Symptom:
- Label contains repeated separators like
||or trailing|.
Fix:
- Wrap uncertain fields with
existsconditions and fallback text.
Overlong Labels
Symptom:
- Text clipping on Android TV / Fire TV.
Fix:
- Move diagnostics to description.
- Add
truncate(n)on unstable long fields.
Incorrect Numeric Display
Symptom:
- Raw byte counts or unreadable integer values.
Fix:
- Add size/time modifiers (
bytes,time) where relevant.
Preview Looks Fine, Device Looks Different
Symptom:
- Line breaks or spacing differ across clients.
Fix:
- Keep format robust without relying heavily on multiline rendering.
Formatter and Filtering Strategy
Formatter does not replace filtering.
Best practice stack:
- Filters remove bad candidates.
- Sorting ranks remaining candidates.
- Formatter communicates rank reasons clearly.
If you use formatter tricks to “hide” poor results, selection quality still degrades.
Version Drift Notes
Formatter syntax and available variables can change between releases/instances.
When migrating:
- Re-open preview and test templates.
- Check for renamed variables.
- Verify conditional blocks still parse.
- Keep one minimal fallback template ready.
Post-Change Audit Tool
AIOStreams Configuration Checklist
Use this after saving your AIOStreams profile. The checklist is stored locally in this browser.
Related Guides
- AIOStreams: Complete Setup and Configuration Guide
- Install & Remove Add-ons Safely (SOP)
- Evaluate Add-on Trust