Frunk.tv EN Open Frunk.tv

Add-ons for Frunk.tv

An add-on brings films, series or channels to Frunk.tv: to Movies & Series and to TV, in the Android app, on the web and in the car. Anyone can make one. It is a set of JSON files asked for over https: Frunk.tv reads them and shows them, and never runs any of the add-on's code. This page explains the format.

How it works

The manifest

A JSON file served over https with Access-Control-Allow-Origin: * (the web asks for it from frunk.tv). The other routes are relative to the manifest's folder.

{
  "frunk_addon": 1,
  "id": "org.example.cinema",
  "name": "Example cinema",
  "description": "What it has, in a sentence or two.",
  "version": "1.0.0",
  "publisher": { "name": "Example", "url": "https://example.org", "contact": "[email protected]" },
  "logo": "logo.png",
  "types": ["movie", "series", "channel"],
  "resources": ["catalog", "meta", "stream", "search", "live"],
  "catalogs": [
    { "type": "movie", "id": "new", "name": "New films", "search": true,
      "filters": [{ "key": "genre", "name": "Genre", "options": ["Comedy", "Drama"] }] },
    { "type": "series", "id": "all", "name": "Series" },
    { "type": "channel", "id": "channels", "name": "Channels", "live": true }
  ],
  "settings": [],
  "debrid": false
}

The routes

All are GET, all end in .json and all answer JSON. So an add-on can be a folder of static files (GitHub Pages, for instance); it only loses search and pages.

catalog/<type>/<catalog>.json?skip=&search=&genre=
meta/<type>/<id>.json
stream/<type>/<id>.json
epg/<channel id>.json?from=&to=

stream is asked for right before playing, so links may be signed and short-lived:

{ "streams": [{
  "url": "https://cdn.example.org/film/master.m3u8",
  "kind": "hls",
  "name": "1080p · English",
  "quality": "1080p",
  "audio": ["en", "es"],
  "subtitles": [{ "lang": "en", "url": "https://cdn.example.org/film/en.vtt", "format": "vtt" }],
  "headers": { "Referer": "https://example.org/" },
  "drm": { "system": "widevine", "license": "https://license.example.org/wv" },
  "live": false
}] }

Settings

If your add-on needs something from the user (their region, their account on your service), declare it in settings and Frunk.tv draws the form:

"settings": [
  { "key": "region", "type": "select", "name": "Region", "options": ["us", "uk"], "default": "us" },
  { "key": "user", "type": "text", "name": "User", "required": true },
  { "key": "pass", "type": "password", "name": "Password", "required": true }
]

The values are kept on the user's device and reach you in the path, before the resource: c/<settings>/catalog/…, with <settings> the values' JSON in base64url.

Add-on repositories

If you publish several add-ons, you can gather them in a repository. It installs with the same link as an add-on, and adding it installs nothing: each add-on is installed on its own, with its own confirmation.

{
  "frunk_addon_repo": 1,
  "id": "org.example.repo",
  "name": "Example add-ons",
  "publisher": { "name": "Example", "contact": "[email protected]" },
  "addons": [
    { "manifest": "cinema/manifest.json", "name": "Example cinema", "types": ["movie", "series"] }
  ]
}

https://frunk.tv/#/addons/add/ followed by the manifest's (or the repository's) address, encoded with encodeURIComponent. To open it straight in the Android app, use https://frunk.tv/addon?m= with the same address.

A catalog in a single file (the catalog format) is an add-on too: a manifest with "frunk_addon": 1 and "bundle" instead of routes is treated as a catalog, and frunk_catalog manifests keep working.

Rules Frunk.tv sets