Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/rivenmedia/riven-ts/llms.txt

Use this file to discover all available pages before exploring further.

Presets are named bundles of ranking model values and settings that give you a sensible starting point without manually specifying every field. Riven ships with one built-in preset — default — and supports fully custom ranking models for users who want complete control over how torrents are scored.

Available Presets

default

The built-in balanced preset. Prioritises lossless remuxes and high-quality web sources, strongly prefers Dolby Vision and HDR10+, and rewards lossless audio (TrueHD / DTS-HD MA). Heavily penalises rips and HDTV sources.

custom

No built-in values — you provide every field in the rankingModel object. Any field you omit defaults to null, which rejects torrents with that attribute. Full control with full responsibility.

The Default Preset

The default preset is designed for a 4K-first, quality-focused library. Its opinionated hierarchy is:
  • Source: Remux (10,000) ≫ Web-DL (200) > Web / Blu-ray (100) ≫ HDTV (−5,000) ≫ rips (−10,000)
  • HDR: Dolby Vision (3,000) > HDR10+ (2,100) > HDR (2,000) > 10-bit (100) > SDR (0)
  • Audio: TrueHD / DTS-Lossless (2,000) > Atmos (1,000) > DDP (150) > AAC / DTS Lossy (100) > DD (50) > FLAC / Stereo (0)
  • Codec: HEVC / AVC / AV1 are all equal (500); lower-quality codecs are left at null
  • Resolution: Only r2160p: true is set in the default preset’s settings block; schema defaults (r1080p: true, r720p: true, unknown: true) remain active, so 4K, 1080p, 720p, and unknown-resolution torrents are all allowed

Using the Default Preset

Set rankingModel to the string "default" in your config file. You can still layer settings overrides on top — they are merged after the preset is loaded:
{
  "$schema": "https://raw.githubusercontent.com/rivenmedia/riven-ts/main/apps/riven/ranking-config.schema.json",
  "rankingModel": "default"
}
To also enable 1080p alongside 4K while keeping all default scores:
{
  "$schema": "https://raw.githubusercontent.com/rivenmedia/riven-ts/main/apps/riven/ranking-config.schema.json",
  "rankingModel": "default",
  "settings": {
    "resolutions": {
      "r2160p": true,
      "r1080p": true
    }
  }
}
When rankingModel is "default", the preset’s settings and your settings block are shallow-merged (top-level keys only). This means if you specify resolutions, your entire resolutions object replaces the preset’s — so always include every resolution key you want enabled, including r2160p, when providing a resolutions override.

Default Preset Full Values

The table below shows every value set by the default preset. Fields not listed are null in the schema defaults (not set by the preset), meaning torrents with those attributes are rejected unless you add them via a settings override or a custom model.
FieldValueNotes
remux10000Blu-ray / UHD remux — highest quality source
webdl200Web-DL from streaming services
web100Generic web source
bluray100Standard Blu-ray encode
hdtv−5000HDTV broadcast — penalised
brrip−10000Blu-ray rip — heavily penalised
hdrip−10000HD rip — heavily penalised
webrip−1000Web rip — moderately penalised
All other quality/rip fields (dvd, vhs, bdrip, dvdrip, etc.) are null — those torrents are rejected.

Custom Preset

When you need scoring logic that deviates significantly from the default, set rankingModel to an object. The preset is bypassed entirely — every field you omit will be null.
A null ranking model field does not mean “ignore this attribute” — it means “reject any torrent that has this attribute.” For example, if you omit avc, torrents with H.264 video will not be fetched. Always explicitly set every attribute you want to allow, even if the score is 0.

Partial Override Pattern

If you only want to change a handful of scores while keeping the rest of the default preset’s logic, use the string "default" for rankingModel and do not put your overrides in settings. Instead, file a bug — there is no partial-override merge for rankingModel; preset vs. custom is a binary choice. For targeted score adjustments, the recommended approach is to copy the default preset values and modify only the fields you care about:
{
  "$schema": "https://raw.githubusercontent.com/rivenmedia/riven-ts/main/apps/riven/ranking-config.schema.json",
  "settings": {
    "resolutions": {
      "r2160p": true,
      "r1080p": true,
      "r720p": true,
      "unknown": true
    }
  },
  "rankingModel": {
    "remux": 10000,
    "webdl": 200,
    "web": 100,
    "bluray": 100,
    "hdtv": -5000,
    "brrip": -10000,
    "hdrip": -10000,
    "webrip": -1000,
    "hevc": 500,
    "avc": 500,
    "av1": 500,
    "dolbyVision": 3000,
    "hdr10plus": 2100,
    "hdr": 2000,
    "bit10": 100,
    "sdr": 0,
    "truehd": 2000,
    "dtsLossless": 2000,
    "atmos": 1000,
    "dolbyDigitalPlus": 150,
    "aac": 100,
    "dtsLossy": 100,
    "dolbyDigital": 50,
    "flac": 0,
    "stereo": 0,
    "surround": 0,
    "proper": 20,
    "repack": 20,
    "edition": 100,
    "dubbed": -1000,
    "hardcoded": 0,
    "network": 0,
    "retail": 0,
    "subbed": 0,
    "scene": 0,
    "uncensored": 0
  }
}

Anime-Optimised Example

This example adjusts the config for an anime library: enables 1080p, allows subbed releases without penalty, penalises dubbed releases less heavily, and removes the strict rip penalties:
{
  "$schema": "https://raw.githubusercontent.com/rivenmedia/riven-ts/main/apps/riven/ranking-config.schema.json",
  "settings": {
    "resolutions": {
      "r2160p": false,
      "r1080p": true,
      "r720p": true,
      "unknown": true
    },
    "options": {
      "titleSimilarity": 0.8
    }
  },
  "rankingModel": {
    "remux": 5000,
    "webdl": 300,
    "web": 200,
    "bluray": 200,
    "hdtv": -2000,
    "webrip": 0,
    "brrip": -2000,
    "hdrip": -1000,
    "hevc": 500,
    "avc": 400,
    "av1": 500,
    "hdr": 1000,
    "hdr10plus": 1200,
    "dolbyVision": 1500,
    "bit10": 100,
    "sdr": 0,
    "truehd": 500,
    "dtsLossless": 500,
    "atmos": 300,
    "dolbyDigitalPlus": 150,
    "aac": 100,
    "dtsLossy": 100,
    "dolbyDigital": 50,
    "flac": 200,
    "stereo": 0,
    "surround": 0,
    "proper": 20,
    "repack": 20,
    "edition": 50,
    "dubbed": -200,
    "subbed": 100,
    "scene": 0,
    "hardcoded": 0
  }
}
Use settings.preferred with regex patterns to give a score bonus to specific release groups or encoding teams you trust. Any torrent matching a preferred pattern receives a flat +10,000 bonus on top of its normal score, making it effectively always win its resolution bucket.

Build docs developers (and LLMs) love