How roialfassi/iptv-saba works
Project type and purpose
• This is a desktop IPTV streaming application written in Python, following an MVC‐like pattern.
• Purpose: allow multiple user profiles, manage M3U playlists, browse/favorite channels, support an “Easy Mode” for elderly users, and play streams via VLC.
File structure
• Top‑level:
• iptv_app.py – application entry point
• requirements.txt, README.md, .gitignore
• src/
• controller/ – orchestrates user actions and connects view ↔ model
– controller.py
• model/ – in‑memory representations
– channel_model.py, group_model.py, profile.py
• data/ – persistence, config, download, profile management
– config_manager.py, data_loader.py, downloader.py, profile_manager.py
• view/ – UI screens
– login_view.py, choose_channel_screen.py, full_screen_view.py, easy_mode_screen.py
Additional insights from README
• Relies on VLC Media Player for playback (external dependency).
• Data persists via config_manager/profile_manager – likely local JSON or database files.
• Streaming URLs are fetched via data/downloader from M3U playlists.
Main components
a. User Interface (View layer)
– Login Screen
– Channel Selection Screen
– Easy Mode Screen
– Full‑Screen Player
b. Controller
– Routes events from UI to model/data
– Applies business logic (e.g., favorite toggling, playlist filtering)
c. Model
– Channel, Group, Profile objects encapsulating state
d. Data Layer
– Config Manager (read/write user settings)
– Profile Manager (create/delete profiles, persist favorites/history)
– Data Loader/Downloader (fetch and parse M3U playlists)
e. External Services
– VLC Media Player (playback engine)
– Internet/M3U provider (stream source)
– Local file system or lightweight DB (where profiles & history are saved)
Relationships and interactions
• User clicks in the View → Controller receives input → Controller calls Model/Data methods → Data layer fetches or persists data → Controller updates Model → Controller instructs View to re-render.
• On “Play” action: Controller hands stream URL to VLC component → VLC renders video in Full‑Screen Player view.
• Easy Mode: Controller reads Profile favorites → passes only favorites to View for simplified navigation.
Architectural patterns and important design principles
• MVC (or Model‑View‑Controller) separation: clean UI ↔ business logic ↔ data persistence
• Single Responsibility: each module focuses on one area (e.g., data/downloader only handles playlist fetching)
• Extensibility: additional features (EPG, new view modes) can be added by creating new view/controller/model classes without major rewrite.
Final checklist
• Clear component labels (e.g., “Profile Manager”, “Full‑Screen Player View”)
• Optionally, numbering the main data flows (1–5) to guide readers through a use case (e.g., app startup, login, channel selection, playback, exit).