Worked Example

Introduction

Almost every TVH system will be slightly different. These worked examples are taken from a system configured for English with dual DVB-T/DVB-C tuners with only DVB-T tuners connected. One IPTV playlist was also loaded. They should be used as a guide as to what to expect rather than definitive documentation.

hello

/api/wizard/hello/load

{
  "entries": [
    {
      "uuid": "00000000000000000000000000000000",
      "id": "00000000000000000000000000000000",
      "text": "00000000000000000000000000000000",
      "caption": "Welcome",
      "class": "wizard_hello",
      "event": "wizard_hello",
      "params": [
        {
          "id": "ui_lang",
          "type": "str",
          "caption": "Language",
          "description": "Select the default user interface language. This can be overridden later in \"Access Entries\" on a per-user basis.",
          "default": "",
          "enum": {
            "type": "api",
            "uri": "language/ui_locale"
          },
          "group": 1,
          "value": ""
        },
        {
          "id": "epg_lang1",
          "type": "str",
          "caption": "Language 1",
          "description": "Select high priority (default) EPG language.",
          "default": "",
          "enum": {
            "type": "api",
            "uri": "language/locale"
          },
          "group": 2,
          "value": ""
        },
        {
          "id": "epg_lang2",
          "type": "str",
          "caption": "Language 2",
          "description": "Select medium priority EPG language.",
          "default": "",
          "enum": {
            "type": "api",
            "uri": "language/locale"
          },
          "group": 2,
          "value": ""
        },
        {
          "id": "epg_lang3",
          "type": "str",
          "caption": "Language 3",
          "description": "Select low priority EPG language.",
          "default": "",
          "enum": {
            "type": "api",
            "uri": "language/locale"
          },
          "group": 2,
          "value": ""
        },
        {
          "id": "icon",
          "type": "str",
          "caption": "",
          "default": "",
          "rdonly": true,
          "noui": true,
          "value": "static/img/logobig.png"
        },
        {
          "id": "description",
          "type": "str",
          "caption": "",
          "default": "",
          "rdonly": true,
          "noui": true,
          "value": "__Welcome to Tvheadend, Your TV Streaming Server and Video Recorder__ \n\nLet's start by configuring the basic language settings. Please select the default user interface and EPG language(s).\n\n* This wizard is optional, and can be cancelled at any time, but recommended for new users.\n* Running this wizard on existing configurations is NOT a good idea as it may lead to confusion, misconfiguration and unexpected features! ;)\n* The wizard will restart and reload the interface in your chosen language, unfortunately not all translations are available/complete.\n* If you get stuck at any point and need a little more information, press [Help].\n"
        },
        {
          "id": "page_next_login",
          "type": "str",
          "caption": "",
          "default": "",
          "rdonly": true,
          "noui": true,
          "value": ""
        }
      ],
      "meta": {
        "caption": "Welcome",
        "class": "wizard_hello",
        "event": "wizard_hello",
        "groups": [
          {
            "number": 1,
            "name": "Web interface"
          },
          {
            "number": 2,
            "name": "EPG Language (priority order)"
          }
        ],
        "props": [
          {
            "id": "ui_lang",
            "type": "str",
            "caption": "Language",
            "description": "Select the default user interface language. This can be overridden later in \"Access Entries\" on a per-user basis.",
            "default": "",
            "enum": {
              "type": "api",
              "uri": "language/ui_locale"
            },
            "group": 1
          },
          {
            "id": "epg_lang1",
            "type": "str",
            "caption": "Language 1",
            "description": "Select high priority (default) EPG language.",
            "default": "",
            "enum": {
              "type": "api",
              "uri": "language/locale"
            },
            "group": 2
          },
          {
            "id": "epg_lang2",
            "type": "str",
            "caption": "Language 2",
            "description": "Select medium priority EPG language.",
            "default": "",
            "enum": {
              "type": "api",
              "uri": "language/locale"
            },
            "group": 2
          },
          {
            "id": "epg_lang3",
            "type": "str",
            "caption": "Language 3",
            "description": "Select low priority EPG language.",
            "default": "",
            "enum": {
              "type": "api",
              "uri": "language/locale"
            },
            "group": 2
          },
          {
            "id": "icon",
            "type": "str",
            "caption": "",
            "default": "",
            "rdonly": true,
            "noui": true
          },
          {
            "id": "description",
            "type": "str",
            "caption": "",
            "default": "",
            "rdonly": true,
            "noui": true
          },
          {
            "id": "page_next_login",
            "type": "str",
            "caption": "",
            "default": "",
            "rdonly": true,
            "noui": true
          }
        ]
      }
    }
  ]
}

The properties involving languages provide an ENUM with a URI from which to obtain validation data for the GUI drop-down list.

/api/wizard/hello/save

The following shows the response for selecting English (GB) as the UI language and French, German and Indonesian as the EPG language preferences.

login

/api/wizard/login/load

/api/wizard/login/save

network

/api/wizard/network/load

/api/wizard/network/save

muxes

/api/wizard/muxes/load

/api/wizard/muxes/save

status

/api/wizard/status/progress?_dc=[timestamp]

A status request is issued at regular intervals until progress = 1.

mapping

/api/wizard/mapping/load

/api/wizard/mapping/save

The following appear out of order, nonetheless, that is the order in which the wizard executed them.

/api/wizard/cancel?_dc=[timestamp]

/api/wizard/channels/save?node={"uuid":"00000000000000000000000000000000"}

Last updated

Was this helpful?