# Ultimate Backend (Kodi Add-on) **Ultimate Backend** is a background service for **Kodi** that provides a local API for **live TV streaming**, **EPG data**, and **manifest management** from supported online TV providers. It acts as the **bridge between streaming services and Kodiโ€™s PVR system**, designed specifically to work together with the official **[PVR IPTV Simple Client](https://github.com/kodi-pvr/pvr.iptvsimple)**. --- ## ๐ŸŽฏ Purpose This add-on runs a small local web service inside Kodi. It: - Logs in to supported streaming providers - Retrieves live channel lists and EPG data - Rewrites DASH manifests for Kodi playback - Generates M3U playlists compatible with PVR IPTV Simple Once configured, your live TV channels from streaming platforms appear directly in Kodiโ€™s **TV** section โ€” complete with EPG, logos, and DRM handling. --- ## ๐Ÿ“บ Supported Providers Currently supported: - ๐Ÿ‡ฉ๐Ÿ‡ช **Joyn (DE)** - ๐Ÿ‡ฆ๐Ÿ‡น **Joyn (AT)** - ๐Ÿ‡จ๐Ÿ‡ญ **Joyn (CH)** - ๐Ÿ‡ช๐Ÿ‡บ **RTL+** More providers will be added in future versions. --- ## โœจ Key Features - ๐Ÿ“ก **Automatic Provider Integration** โ€“ Unified access to multiple streaming services - ๐Ÿ” **Manifest Proxying & Rewriting** โ€“ For seamless DASH playback via InputStream Adaptive - ๐Ÿ” **DRM Support** โ€“ Handles Widevine, PlayReady, and ClearKey license data - ๐Ÿ—“๏ธ **EPG Data** โ€“ XMLTV-compatible program guide per provider - ๐ŸŽต **M3U Playlist Generation** โ€“ One-click generation for Kodi PVR clients - โšก **Caching System** โ€“ Caches manifests and playlists for fast reloads - ๐ŸŒ **Regional Support** โ€“ Separate configurations for Germany, Austria, and Switzerland --- ## ๐Ÿงฉ Installation 1. Copy or clone this addon into your Kodi `addons` directory: ``` ~/.kodi/addons/script.service.ultimate ``` 2. Required dependencies (Kodi installs these automatically): - `xbmc.python` โ‰ฅ 3.0.0 - `script.module.bottle` โ‰ฅ 0.12.25 - `script.module.requests` โ‰ฅ 2.25.1 - `script.module.pycryptodome` โ‰ฅ 3.4.3 3. Restart Kodi โ€” the **Ultimate Backend** service starts automatically on login. --- ## โš™๏ธ Configuration Go to: > **Settings โ†’ Add-ons โ†’ Ultimate Backend โ†’ Configure** ### General Settings | Setting | Description | Default | |----------|--------------|----------| | **Server Port** | Port of the local API | `7777` | | **Default Country** | Default region (DE, AT, CH, EU) | `DE` | | **API Key** | Optional global API key | *empty* | | **Enable EPG Caching** | Cache EPG data locally | โœ… On | | **Cache Duration (hours)** | Cache lifetime | `6` | ### Provider Settings Each provider (Joyn DE/AT/CH, RTL+) can be configured individually: - Enable or disable provider - Enter login credentials (username/password) - Configure proxy settings if needed (host and port) Example for Joyn (DE): - Enable Joyn (DE) - Enter your credentials - Optionally enable and configure proxy --- ## ๐Ÿง  Using with PVR IPTV Simple Client The **Ultimate Backend** add-on is designed to work **together with** โžก๏ธ **[PVR IPTV Simple Client](https://github.com/kodi-pvr/pvr.iptvsimple)** ### Setup Steps 1. In Kodi, go to: **Add-ons โ†’ My Add-ons โ†’ PVR Clients โ†’ PVR IPTV Simple Client โ†’ Configure** 2. Under **General โ†’ Location**, select: ๐ŸŸข *Remote Path (Internet address)* 3. Enter these URLs: **M3U Playlist URL:** ``` http://localhost:7777/api/m3u ``` **EPG XMLTV URL** (example for Joyn DE): ``` http://localhost:7777/api/providers/joyn_de/epg ``` 4. Save and restart Kodiโ€™s PVR subsystem (or Kodi itself). Your live TV channels and EPG will now appear in Kodiโ€™s **TV** section. ๐Ÿ’ก **Tip:** To regenerate and cache the latest M3U playlist manually, open this in your browser: ``` http://localhost:7777/api/m3u/generate ``` This forces the backend to rebuild and cache the playlist for faster future loading. --- ## ๐ŸŒ API Overview Once running, the addon exposes a local API: ``` http://localhost:7777/ ``` ### Common Endpoints | Endpoint | Description | |-----------|--------------| | `/api/providers` | List all configured providers | | `/api/providers//channels` | Get available channels | | `/api/providers//channels//manifest` | Get or rewrite manifest | | `/api/providers//channels//stream` | Direct stream redirect | | `/api/providers//epg` | Get EPG in XMLTV format | | `/api/m3u` | Cached combined playlist | | `/api/m3u/generate` | Force regeneration and caching of playlist | | `/api/cache/mpd/clear` | Clear MPD cache | | `/api/cache/mpd/clear-expired` | Clear expired cache entries | --- ## ๐Ÿงผ Cache Management Ultimate Backend automatically caches: - DASH Manifests - EPG Data - M3U Playlists ### Manual cache actions: | Purpose | URL | |----------|-----| | Clear all MPD cache | `/api/cache/mpd/clear` | | Remove expired entries | `/api/cache/mpd/clear-expired` | | Force M3U regeneration | `/api/m3u/generate` | | Force provider-specific M3U regeneration | `/api/providers//m3u/generate` |