$ show Guovin/iptv-api
This repository is an IPTV live-source automation tool that collects, tests, and aggregates TV channel streams from various sources (local files, subscriptions, EPG). It provides multiple interfaces: a CLI for updating channel lists, a REST API for serving M3U/TXT playlists, an RTMP/HLS streaming service for relaying channels, and desktop GUIs (Qt and Tkinter) for configuration and monitoring. The application is modular, with separate components for data fetching, channel testing, result aggregation, streaming, and GUI. It uses Docker for easy deployment and includes features like automatic speed testing, resolution filtering, whitelist/blacklist management, and EPG integration. The code demonstrates strong engineering practices with reusable components such as a structured reporting system, adaptive performance tuning, smart URL freezing with backoff, and cross-platform process handling.
The LLM identified 4 files worth highlighting for reuse:
Provides a flexible reporting system with support for console, file, and JSONL outputs. Includes progress tracking, task grouping, and automatic log rotation. Designed for extensibility and reuse in other projects with minimal dependencies.
Implements dynamic concurrency adjustment based on system CPU and memory usage. Automatically scales worker counts to optimize resource utilization without overloading the system. Self-contained and easily integrable into any asyncio-based project requiring adaptive parallelism.
Generates stable, collision-resistant identifiers for resources (like channel URLs) using SHA-256 of normalized URL and headers. Enables reliable caching and deduplication across runs and sources. Independent of external dependencies and suitable for any web resource tracking scenario.
Offers cross-platform subprocess creation with special handling for windowless execution on Windows. Abstracts platform-specific flags and provides a clean interface for launching and managing external processes. Zero internal dependencies beyond the standard library and platform module.