# webdevelopersrinu/jiohotstar-downloader architecture

> Architecture diagram of the GitHub repository webdevelopersrinu/jiohotstar-downloader, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/webdevelopersrinu/jiohotstar-downloader
- Repository: https://github.com/webdevelopersrinu/jiohotstar-downloader

## Overview

JioHotstar Downloader is a desktop GUI for selecting and downloading Hotstar streams, including plain and Widevine-protected content. The documented workflow runs from URL or content ID entry through login-backed stream discovery, quality/audio/subtitle selection, optional key retrieval, and download/muxing with external engines. The single 128 KB module contains the GUI and runtime logic; the excerpts show stream fetching, playlist parsing, token persistence, and fallback handling, but not enough wiring to map every internal call. Other feature branches follow the README and are not individually verified in source.

Main entry points: [`hotstar_gui.py`](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py) (Downloader GUI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_ui["Desktop interface"]
  node_gui["Downloader GUI<br/>[hotstar_gui.py]"]
  node_settings["Settings<br/>[hotstar_gui.py]"]
end

subgraph group_g_access["Account and discovery"]
  node_login["OTP login<br/>[hotstar_gui.py]"]
  node_tokens[("Token storage<br/>[hotstar_gui.py]")]
  node_content["Content lookup<br/>[hotstar_gui.py]"]
  node_stream_api["Playback API<br/>[hotstar_gui.py]"]
end

subgraph group_g_media["Stream preparation"]
  node_manifests["Manifest parsing<br/>[hotstar_gui.py]"]
  node_quality["Quality selection<br/>[hotstar_gui.py]"]
  node_track_select["Track selection<br/>[hotstar_gui.py]"]
  node_key_fetch["Widevine keys<br/>[hotstar_gui.py]"]
  node_wvd["WVD device file"]
end

subgraph group_g_download["Download and output"]
  node_command["Download command<br/>[hotstar_gui.py]"]
  node_engine_primary{{"N_m3u8DL-RE"}}
  node_engine_ytdlp{{"yt-dlp fallback"}}
  node_engine_ffmpeg{{"ffmpeg fallback<br/>[hotstar_gui.py]"}}
  node_mux["Muxing and progress<br/>[hotstar_gui.py]"]
  node_output["MKV output"]
end

node_user(("User"))
node_hotstar{{"Hotstar services"}}

node_user -->|"uses"| node_gui
node_gui -->|"requests login"| node_login
node_login -->|"requests OTP"| node_hotstar
node_login -->|"loads or saves"| node_tokens
node_gui -->|"submits URL"| node_content
node_content -.->|"fetches playback"| node_stream_api
node_stream_api -->|"requests streams"| node_hotstar
node_stream_api -.->|"provides URLs"| node_manifests
node_manifests -->|"lists qualities"| node_quality
node_manifests -->|"lists tracks"| node_track_select
node_gui -->|"requests keys"| node_key_fetch
node_key_fetch -->|"uses device"| node_wvd
node_key_fetch -->|"requests license"| node_hotstar
node_gui -->|"configures paths"| node_settings
node_gui -->|"selects quality"| node_quality
node_gui -->|"selects tracks"| node_track_select
node_gui -.->|"starts download"| node_command
node_command -.->|"dispatches primary"| node_engine_primary
node_command -.->|"dispatches fallback"| node_engine_ytdlp
node_command -->|"runs fallback"| node_engine_ffmpeg
node_engine_primary -->|"downloads and muxes"| node_mux
node_engine_ytdlp -->|"downloads and muxes"| node_mux
node_engine_ffmpeg -->|"writes media"| node_mux
node_mux -->|"produces MKV"| node_output

click node_gui "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_settings "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_login "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_tokens "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_content "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_stream_api "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_manifests "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_quality "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_track_select "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_key_fetch "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_command "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_engine_ffmpeg "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"
click node_mux "https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gui,node_settings,node_user toneBlue
class node_login,node_tokens,node_content,node_stream_api toneAmber
class node_manifests,node_quality,node_track_select,node_key_fetch,node_wvd toneMint
class node_command,node_engine_primary,node_engine_ytdlp,node_engine_ffmpeg,node_mux,node_output toneRose
class node_hotstar toneIndigo
```

## Components

### Desktop interface

- [Downloader GUI](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`
- [Settings](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`

### Account and discovery

- [OTP login](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`
- [Token storage](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`
- [Content lookup](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`
- [Playback API](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`

### Stream preparation

- [Manifest parsing](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`
- [Quality selection](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`
- [Track selection](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`
- [Widevine keys](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`
- **WVD device file**

### Download and output

- [Download command](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`
- **N_m3u8DL-RE**
- **yt-dlp fallback**
- [ffmpeg fallback](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`
- [Muxing and progress](https://github.com/webdevelopersrinu/jiohotstar-downloader/blob/main/hotstar_gui.py): `hotstar_gui.py`
- **MKV output**

### Other components

- **User**
- **Hotstar services**

## Connections

- User → Downloader GUI: uses (evidence: `README.md`)
- Downloader GUI → OTP login: requests login (evidence: `README.md`)
- OTP login → Hotstar services: requests OTP (evidence: `README.md`)
- OTP login → Token storage: loads or saves (evidence: `hotstar_gui.py`)
- Downloader GUI → Content lookup: submits URL (evidence: `README.md`)
- Content lookup → Playback API: fetches playback (evidence: `hotstar_gui.py`)
- Playback API → Hotstar services: requests streams (evidence: `hotstar_gui.py`)
- Playback API → Manifest parsing: provides URLs (evidence: `hotstar_gui.py`)
- Manifest parsing → Quality selection: lists qualities (evidence: `README.md`)
- Manifest parsing → Track selection: lists tracks (evidence: `README.md`)
- Downloader GUI → Widevine keys: requests keys (evidence: `README.md`)
- Widevine keys → WVD device file: uses device (evidence: `README.md`)
- Widevine keys → Hotstar services: requests license (evidence: `README.md`)
- Downloader GUI → Settings: configures paths (evidence: `README.md`)
- Downloader GUI → Quality selection: selects quality (evidence: `README.md`)
- Downloader GUI → Track selection: selects tracks (evidence: `README.md`)
- Downloader GUI → Download command: starts download (evidence: `hotstar_gui.py`)
- Download command → N_m3u8DL-RE: dispatches primary
- Download command → yt-dlp fallback: dispatches fallback
- Download command → ffmpeg fallback: runs fallback (evidence: `hotstar_gui.py`)
- N_m3u8DL-RE → Muxing and progress: downloads and muxes (evidence: `README.md`)
- yt-dlp fallback → Muxing and progress: downloads and muxes (evidence: `README.md`)
- ffmpeg fallback → Muxing and progress: writes media (evidence: `hotstar_gui.py`)
- Muxing and progress → MKV output: produces MKV (evidence: `README.md`)
