# buddychewchew/my-streams architecture

> Architecture diagram of the GitHub repository buddychewchew/my-streams, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/buddychewchew/my-streams
- Repository: https://github.com/buddychewchew/my-streams

## Overview

My-Streams is a repository of IPTV playlists and related utilities, rather than a player or streaming host. The main user-facing result is a collection of M3U playlists; separate scripts refresh a playlist from a configured source, scrape TheTVApp streams into its playlist, and generate or merge EPG data. The tree also contains archived playlists, individual-channel streams, logos, and Samsung update scripts. Edges are limited to relationships shown in the README or sampled scripts; unsampled assets and integrations are represented without inferred processing links.

Main entry points: [`Backup/Backup-dummy-epg.py`](https://github.com/buddychewchew/my-streams/blob/main/Backup/Backup-dummy-epg.py) (EPG generator and merger), [`tv.py`](https://github.com/buddychewchew/my-streams/blob/main/tv.py) (TheTVApp scraper), [`update_tv.py`](https://github.com/buddychewchew/my-streams/blob/main/update_tv.py) (Playlist updater), [`Backup/epg.xml`](https://github.com/buddychewchew/my-streams/blob/main/Backup/epg.xml) (Dummy EPG)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_playlists["Playlists"]
  node_playlist_collection["Playlist collection<br/>[tv.m3u]"]
  node_main_playlist["Main playlist<br/>[tv.m3u]"]
  node_thetvapp_playlist["TheTVApp playlist<br/>[TheTVApp.m3u8]"]
  node_single_channel_streams["Single-channel streams"]
  node_archived_playlists["Archived playlists"]
end

subgraph group_refresh["Playlist Refresh"]
  node_thetvapp_scraper["TheTVApp scraper<br/>[tv.py]"]
  node_playlist_updater["Playlist updater<br/>[update_tv.py]"]
end

subgraph group_epg["EPG Data"]
  node_epg_generator_merger["EPG generator and merger"]
  node_dummy_epg["Dummy EPG<br/>[epg.xml]"]
  node_merged_epg["Merged EPG<br/>[merged-epg.xml.gz]"]
  node_epg_ids["EPG channel IDs<br/>[epg_ids.txt]"]
end

subgraph group_support["Supporting Assets"]
  node_logos["Logos"]
  node_backup_assets["Backup assets"]
  node_samsung_scripts["Samsung update scripts"]
end

node_viewer(("Playlist users"))
node_m3u_source{{"M3U source"}}
node_thetvapp_service{{"TheTVApp service"}}
node_remote_epg{{"Remote light EPG"}}

node_viewer -->|"uses"| node_playlist_collection
node_playlist_updater -->|"fetches"| node_m3u_source
node_playlist_updater -->|"writes"| node_main_playlist
node_thetvapp_scraper -->|"scrapes"| node_thetvapp_service
node_thetvapp_scraper -->|"reads and updates"| node_thetvapp_playlist
node_epg_generator_merger -->|"writes"| node_dummy_epg
node_epg_generator_merger -->|"writes"| node_epg_ids
node_epg_generator_merger -->|"reads"| node_dummy_epg
node_epg_generator_merger -->|"downloads"| node_remote_epg
node_epg_generator_merger -->|"writes"| node_merged_epg

click node_playlist_collection "https://github.com/buddychewchew/my-streams/blob/main/tv.m3u"
click node_main_playlist "https://github.com/buddychewchew/my-streams/blob/main/tv.m3u"
click node_thetvapp_playlist "https://github.com/buddychewchew/my-streams/blob/main/TheTVApp.m3u8"
click node_single_channel_streams "https://github.com/buddychewchew/my-streams/tree/main/Single%20Ch%20Streams"
click node_archived_playlists "https://github.com/buddychewchew/my-streams/tree/main/Archive"
click node_thetvapp_scraper "https://github.com/buddychewchew/my-streams/blob/main/tv.py"
click node_playlist_updater "https://github.com/buddychewchew/my-streams/blob/main/update_tv.py"
click node_epg_generator_merger "https://github.com/buddychewchew/my-streams/blob/main/Backup/Backup-dummy-epg.py"
click node_dummy_epg "https://github.com/buddychewchew/my-streams/blob/main/Backup/epg.xml"
click node_merged_epg "https://github.com/buddychewchew/my-streams/blob/main/Backup/merged-epg.xml.gz"
click node_epg_ids "https://github.com/buddychewchew/my-streams/blob/main/Backup/epg_ids.txt"
click node_logos "https://github.com/buddychewchew/my-streams/tree/main/Logos"
click node_backup_assets "https://github.com/buddychewchew/my-streams/tree/main/Backup"
click node_samsung_scripts "https://github.com/buddychewchew/my-streams/tree/main/Google%20Script%20And%20Install%20Info"

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_playlist_collection,node_main_playlist,node_thetvapp_playlist,node_single_channel_streams,node_archived_playlists,node_viewer toneBlue
class node_thetvapp_scraper,node_playlist_updater toneAmber
class node_epg_generator_merger,node_dummy_epg,node_merged_epg,node_epg_ids toneMint
class node_logos,node_backup_assets,node_samsung_scripts toneRose
class node_m3u_source,node_thetvapp_service,node_remote_epg toneIndigo
```

## Components

### Playlists

- [Playlist collection](https://github.com/buddychewchew/my-streams/blob/main/tv.m3u): `tv.m3u`
- [Main playlist](https://github.com/buddychewchew/my-streams/blob/main/tv.m3u): `tv.m3u`
- [TheTVApp playlist](https://github.com/buddychewchew/my-streams/blob/main/TheTVApp.m3u8): `TheTVApp.m3u8`
- [Single-channel streams](https://github.com/buddychewchew/my-streams/tree/main/Single%20Ch%20Streams): `Single Ch Streams`
- [Archived playlists](https://github.com/buddychewchew/my-streams/tree/main/Archive): `Archive`

### Playlist Refresh

- [TheTVApp scraper](https://github.com/buddychewchew/my-streams/blob/main/tv.py): `tv.py`
- [Playlist updater](https://github.com/buddychewchew/my-streams/blob/main/update_tv.py): `update_tv.py`

### EPG Data

- [EPG generator and merger](https://github.com/buddychewchew/my-streams/blob/main/Backup/Backup-dummy-epg.py): `Backup/Backup-dummy-epg.py`
- [Dummy EPG](https://github.com/buddychewchew/my-streams/blob/main/Backup/epg.xml): `Backup/epg.xml`
- [Merged EPG](https://github.com/buddychewchew/my-streams/blob/main/Backup/merged-epg.xml.gz): `Backup/merged-epg.xml.gz`
- [EPG channel IDs](https://github.com/buddychewchew/my-streams/blob/main/Backup/epg_ids.txt): `Backup/epg_ids.txt`

### Supporting Assets

- [Logos](https://github.com/buddychewchew/my-streams/tree/main/Logos): `Logos`
- [Backup assets](https://github.com/buddychewchew/my-streams/tree/main/Backup): `Backup`
- [Samsung update scripts](https://github.com/buddychewchew/my-streams/tree/main/Google%20Script%20And%20Install%20Info): `Google Script And Install Info`

### Other components

- **Playlist users**
- **M3U source**
- **TheTVApp service**
- **Remote light EPG**

## Connections

- Playlist users → Playlist collection: uses (evidence: `ReadMe.md`)
- Playlist updater → M3U source: fetches (evidence: `update_tv.py`)
- Playlist updater → Main playlist: writes (evidence: `update_tv.py`)
- TheTVApp scraper → TheTVApp service: scrapes (evidence: `tv.py`)
- TheTVApp scraper → TheTVApp playlist: reads and updates (evidence: `tv.py`)
- EPG generator and merger → Dummy EPG: writes (evidence: `Backup/Backup-dummy-epg.py`)
- EPG generator and merger → EPG channel IDs: writes (evidence: `Backup/Backup-dummy-epg.py`)
- EPG generator and merger → Dummy EPG: reads (evidence: `Backup/Backup-dummy-epg.py`)
- EPG generator and merger → Remote light EPG: downloads (evidence: `Backup/Backup-dummy-epg.py`)
- EPG generator and merger → Merged EPG: writes (evidence: `Backup/Backup-dummy-epg.py`)
