Skip to content

Formatter Reference

If you want the outcome and the recommended template shape, start with Universal Formatter first. This page is the syntax reference for the portal editor and the built-in templates.

Nexio’s formatter syntax follows the AIO-style formatting lineage popularized by Viren070’s AIOStreams work. The core formatter implementation in Nexio is adapted from earlier open-source formatter code and keeps that same mental model of variables, modifiers, and conditions.

Quick mental model

A formatter is:

  • plain text
  • plus variables like {stream.title}
  • plus modifiers like ::title
  • plus conditions like ::exists["yes"||"no"]
  • plus inline image tokens like [[icon:4k]]
  • plus stream chip tokens like [[chip:cached]]

Custom formatters have three template fields:

  • nameTemplate controls the stream card title.
  • descriptionTemplate controls the multiline detail text.
  • badgeRowTemplate controls an optional full-width row below the main card content. Leave it blank to skip the row.

Core syntax

Plain variable

text
{stream.filename}

Variable with modifiers

text
{stream.title::title::truncate(30)}

Conditional block

text
{stream.year::exists[" ({stream.year})"||""]}

Combined condition

text
{stream.filename::~NF::and::stream.releaseGroup::exists[" • "||""]}

Built-in template family

Nexio ships with built-in presets that reflect common formatting styles:

  • Universal for a clean cross-provider look
  • Torrentio for a Torrentio-style card layout
  • TorBox for cloud or debrid-oriented presentation
  • GDrive, Light GDrive, and Minimalistic GDrive for Google-Drive-style libraries
  • Prism for a compact, aesthetic layout
  • Tamtaro for a dense, information-rich layout

These presets are a good reference even if you plan to write a custom template.

Inline icon tokens

Inline icon tokens let you place small branded or technical badges directly inside formatter output. They are especially useful when you want a stream title or description to communicate provider, audio format, HDR format, or headline resolution without adding more words.

Use this syntax:

text
[[icon:4k]]
[[icon:netflix]]
[[icon:atmos]]

You can place icon tokens anywhere plain text is allowed:

text
[[icon:4k]] {stream.title}
[[icon:dovi]] {stream.visualTags::join(' • ')}
{service.cached::istrue["[[icon:prime]] Instant"||"[[icon:prime]] Cloud"]}

How icon tokens behave

  • Tokens are case-insensitive, so [[icon:4k]] and [[icon:4K]] both resolve.
  • If a token is recognized, Nexio renders the matching icon in the web formatter preview and in the TV app formatter output.
  • If a token is not recognized, Nexio leaves the original text in place instead of silently deleting it.
  • When formatted text is converted to plain text, Nexio uses the icon's fallback label so the output still reads cleanly.

Available icon tokens

Streaming services

TokenMeaning
[[icon:netflix]]Netflix
[[icon:disneyplus]]Disney+
[[icon:hbo]]HBO Max
[[icon:max]]Max
[[icon:prime]]Amazon / Prime Video
[[icon:appletv]]Apple TV+
[[icon:paramount]]Paramount+
[[icon:peacock]]Peacock
[[icon:crunchyroll]]Crunchyroll

Debrid and cloud providers

TokenMeaning
[[icon:realdebrid]]Real-Debrid
[[icon:premiumize]]Premiumize
[[icon:alldebrid]]AllDebrid
[[icon:debridlink]]Debrid-Link
[[icon:torbox]]TorBox
[[icon:offcloud]]Offcloud
[[icon:putio]]put.io
[[icon:easydebrid]]EasyDebrid
[[icon:debrider]]Debrider
[[icon:pikpak]]PikPak
[[icon:seedr]]Seedr

Usenet providers

TokenMeaning
[[icon:easynews]]Easynews
[[icon:nzbdav]]NzbDAV
[[icon:altmount]]AltMount
[[icon:stremionntp]]Stremio NNTP
[[icon:stremthrunewz]]StremThru Newz

Audio formats

TokenMeaning
[[icon:atmos]]Dolby Atmos
[[icon:truehd]]Dolby TrueHD
[[icon:ddp]]Dolby Digital+
[[icon:dd]]Dolby Digital
[[icon:dts]]DTS
[[icon:dtshd]]DTS-HD MA
[[icon:dtsx]]DTS:X
[[icon:stereo]]Stereo

HDR and video badges

TokenMeaning
[[icon:dovi]]Dolby Vision
[[icon:hdr10]]HDR10

Headline resolution badges

TokenMeaning
[[icon:4k]]4K
[[icon:2k]]2K
[[icon:fullhd]]Full HD
[[icon:hd]]HD
[[icon:sd]]SD

Practical guidance

  • Use icons for information users can scan instantly, such as service branding, premium audio, HDR, and headline resolution.
  • Keep them near the start of a title or the start of a short metadata line so they read like badges rather than decoration.
  • Prefer one or two strong icons over a long chain of small badges.
  • If you need broad compatibility outside icon-aware surfaces, include a text fallback nearby such as {stream.audioTags::join(' • ')}.

Stream chip tokens

Stream chip tokens render the same chip styling used by Nexio's automatic stream badges. Place them inline inside nameTemplate or descriptionTemplate, or put them in badgeRowTemplate for a separate full-width badge row.

Use this syntax:

text
[[chip:cached]]
[[chip:torrent]]
[[chip:youtube]]
[[chip:external]]

Available chip tokens:

TokenMeaning
[[chip:cached]]Cached / instant stream
[[chip:torrent]]Torrent / P2P stream
[[chip:youtube]]YouTube stream
[[chip:external]]External player stream

Inline example:

text
{service.cached::istrue["[[chip:cached]] "||""]}{stream.resolution} {stream.title}

Separate badge row example:

text
badgeRowTemplate:
{service.cached::istrue["[[chip:cached]]"||""]}{stream.type::=p2p[" [[chip:torrent]]"||""]}

If badgeRowTemplate is configured, Nexio treats that row as the replacement for the automatic bottom chip row. The automatic row does not appear unless the formatter recreates it with [[chip:*]] tokens. Inline [[chip:*]] tokens in nameTemplate or descriptionTemplate also suppress the automatic row.

Universal formatter examples

The built-in Universal formatter currently uses icon tokens in three main places:

  • Title line: headline resolution badges such as [[icon:4k]], [[icon:2k]], and [[icon:fullhd]]
  • Badge line: visual and audio badges such as [[icon:dovi]], [[icon:hdr10]], [[icon:atmos]], and [[icon:dtshd]]
  • Provider line: filename-based platform icons such as [[icon:netflix]] plus service icons such as [[icon:realdebrid]], [[icon:premiumize]], [[icon:torbox]], [[icon:alldebrid]], [[icon:easynews]], or [[icon:stremthrunewz]]

That means custom templates can mix platform and debrid badges in the same line, for example:

text
{stream.filename::~NF["[[icon:netflix]] Netflix"||""]}{stream.filename::~NF::and::service.name::exists[" • "||""]}{service.name::~Real-Debrid["[[icon:realdebrid]] Real-Debrid"||"{service.name}"]}

Variables

stream

These fields are the most useful for titles, badges, and descriptions.

VariableTypeDescription
{stream.filename}StringOriginal filename used for parsing.
{stream.folderName}StringParent folder name if available.
{stream.title}StringParsed title.
{stream.year}String / NumberParsed year.
{stream.seasons}ArrayRaw season values.
{stream.episodes}ArrayRaw episode values.
{stream.formattedSeasons}ArrayHuman-friendly season labels.
{stream.formattedEpisodes}ArrayHuman-friendly episode labels.
{stream.seasonEpisode}ArrayCompact season and episode pair values.
{stream.seasonPack}BooleanWhether the stream is a season pack.
{stream.size}NumberFile size in bytes.
{stream.folderSize}NumberFolder or package size in bytes.
{stream.duration}NumberDuration in milliseconds.
{stream.bitrate}NumberBitrate in bits per second.
{stream.age}Number / StringAge derived from provider metadata.
{stream.indexer}StringUpstream indexer or source name.
{stream.resolution}String2160p, 1440p, 1080p, 720p, etc.
{stream.quality}StringBluRay, BluRay Remux, WEB-DL, HDTV, and similar.
{stream.encode}StringHEVC, AVC, AV1, and similar.
{stream.visualTags}ArrayDV, HDR10, HDR10+, IMAX, 10bit, and similar.
{stream.audioTags}ArrayAtmos, TrueHD, DTS:X, DTS-HD MA, DD+, and similar.
{stream.audioChannels}Array7.1, 5.1, 2.0, and similar.
{stream.languages}ArrayAll audio languages.
{stream.languageCodes}ArrayISO language codes.
{stream.languageEmojis}ArrayLanguage flag emojis.
{stream.subtitles}ArraySubtitle languages.
{stream.subtitleCodes}ArraySubtitle language codes.
{stream.subtitleEmojis}ArraySubtitle flag emojis.
{stream.releaseGroup}StringScene or group tag parsed from the filename.
{stream.message}StringProvider message or status line.
{stream.type}Stringdebrid, p2p, usenet, http, live, youtube, or external.
{stream.private}BooleanPrivate tracker or private source flag.
{stream.proxied}BooleanWhether the stream is proxied.
{stream.library}BooleanWhether the stream already exists in your library.
{stream.infoHash}StringTorrent hash, when available.
{stream.videoHash}StringVideo hash when available.
{stream.seeders}NumberSeeder count for P2P streams.
{stream.repack}BooleanRepack or proper flag.
{stream.regraded}BooleanRegraded visual tag.
{stream.unrated}BooleanUnrated release flag.
{stream.uncensored}BooleanUncensored release flag.
{stream.upscaled}BooleanUpscaled release flag.
{stream.seadex}BooleanSeaDex curated match.
{stream.seadexBest}BooleanSeaDex best-match flag.
{stream.regexMatched}StringBest matching regex label.
{stream.rankedRegexMatched}ArrayOrdered regex match labels.
{stream.seMatched}StringBest matching stream-expression label.
{stream.rseMatched}ArrayOrdered stream-expression match labels.
{stream.regexScore}NumberRaw regex score.
{stream.nRegexScore}NumberNormalized regex score.
{stream.seScore}NumberRaw stream-expression score.
{stream.nSeScore}NumberNormalized stream-expression score.

service

VariableTypeDescription
{service.id}StringInternal service ID.
{service.name}StringFull service name like Real-Debrid.
{service.shortName}StringCompact service name like RD.
{service.cached}BooleanWhether the stream is cached or instant.

addon

VariableTypeDescription
{addon.name}StringAddon or provider display name.

metadata

VariableTypeDescription
{metadata.title}StringQueried content title.
{metadata.year}NumberQueried content year.
{metadata.runtime}NumberRuntime in minutes.
{metadata.episodeRuntime}NumberEpisode runtime in minutes.
{metadata.queryType}Stringmovie, series, or similar.

User-filtered helpers

These helpers already respect the user’s language preferences.

VariableDescription
{stream.uLanguages}Preferred audio languages present in the stream.
{stream.uLanguageCodes}Preferred language codes.
{stream.uLanguageEmojis}Preferred language flags.
{stream.uSubtitles}Preferred subtitle languages present in the stream.
{stream.uSubtitleCodes}Preferred subtitle language codes.
{stream.uSubtitleEmojis}Preferred subtitle flags.

Tools

VariableDescription
{tools.newLine}Forces a new line.
{tools.removeLine}Removes the whole rendered line when used in a branch that should collapse.

Text modifiers

ModifierDescription
::upperConvert to uppercase.
::lowerConvert to lowercase.
::titleConvert to title case.
::trimRemove leading and trailing spaces.
::truncate(N)Truncate to length N.
::replace('old','new')Replace text.
::remove('text')Remove text.
::reverseReverse string or array.
::base64Base64-encode a string.

Numeric and unit modifiers

ModifierDescription
::bytesHuman-readable bytes.
::bytes10Human-readable decimal bytes.
::sbytesShort byte form.
::rbytesRounded byte form.
::bitrateHuman-readable bitrate.
::sbitrateShort bitrate form.
::rbitrateRounded bitrate form.
::timeConvert milliseconds to readable time.
::ageConvert age value to compact age text.
::commaAdd thousands separators.
::hexConvert to hexadecimal.
::octalConvert to octal.
::binaryConvert to binary.
::starConvert a numeric score to stars.
::pstarSame as ::star but padded.

Array modifiers

ModifierDescription
::join(' sep ')Join array values with a separator.
::firstFirst array element.
::lastLast array element.
::get(N)Get element at index N.
::slice(S,E)Slice array from S to E.
::randomRandom element.
::lengthArray length.
::sortSmart sort.
::rsortReverse sort.
::lsortAlphabetical sort.

Localization modifiers

ModifierDescription
::flagLanguage name to emoji flag.
::langcodeLanguage name to ISO code.
::langISO code to language name.

Conditions and comparisons

Conditionals use this form:

text
{value::condition["true output"||"false output"]}

Boolean conditions

  • ::istrue
  • ::isfalse

Presence conditions

  • ::exists

Numeric and string comparisons

  • ::>value
  • ::<value
  • ::>=value
  • ::<=value
  • ::=value
  • ::!=value

String matching

  • ::~value contains
  • ::$value starts with
  • ::^value ends with

Comparator chains

You can chain conditions together without nesting.

Available comparators

  • ::and::
  • ::or::
  • ::xor::
  • ::neq::
  • ::equal::
  • ::left::
  • ::right::

Examples

text
{stream.uLanguages::exists::and::stream.releaseGroup::exists[" • "||""]}
text
{stream.filename::~NF::or::stream.filename::~DSNP::or::stream.filename::~AMZN::and::stream.releaseGroup::exists[" • "||""]}
text
{stream.seadexBest::istrue[" 🏆 BEST"||""]}{stream.seadex::istrue::and::stream.seadexBest::isfalse[" 🥈 ALT"||""]}

Practical notes

  • Prefer ::exists[...] around optional values so empty fields do not leave awkward spacing behind.
  • Use tools.removeLine when you want a whole line to disappear if a branch does not match.
  • Keep formatter logic readable by building it one condition at a time and validating with the preview.

Released under the GPL-3.0 License.