How teagod-s/unbox works
UnBox is a cross-platform IPTV and local-media desktop player. Users import VOD or live sources, browse/search catalogs or scan local folders, then play selected streams with the web player or mpv; viewing history supports resume. The graph also preserves documented playback automation, source management, donations, and the library path. Backend composition links are supported by the shell service’s imports and excerpts; frontend and product-capability links rely on the shown App excerpts and README, since many implementation files were not sampled.
Main entry points: service.go Wails service · App.vue App workflow · drpy.go TVBox providers · library.go Media library
Components 21
Desktop experience
- App workflow
frontend/src/App.vue - Web playback
frontend/src/components/PlaybackView.vue - Track controls
frontend/src/useHlsTracks.ts - Playback automation
frontend/src/playbackAutomation.ts - Donation list
frontend/src/donation.ts
Sources and catalogs
- Source config
internal/config/resolve.go - JS crawler
internal/crawler/inline.go - TVBox providers
internal/provider/tvbox/drpy.go - Live provider
internal/provider/live/live.go - Source services
Playback and library
- Media library
internal/library/library.go - Poster generation
internal/library/thumb/thumb.go - Playback routing
internal/playback/controller.go - Stream proxy
internal/playback/proxy.go - Player interface
internal/player/player.go - mpv process
internal/player/mpvproc/mpvproc.go - mpv manager
internal/player/mpvplugin/manager.go
App services and state
- Wails service
internal/shell/service.go - SQLite state
internal/store/store.go
Other components
- Viewer
- SQLite database
Connections 23
- Viewer → App workflow: browses and selects
- App workflow → Wails service: calls services
frontend/src/App.vue - Wails service → Source config: resolves imports
internal/shell/service.go - Source config → Source services: fetches source data
- Wails service → TVBox providers: dispatches VOD
internal/shell/service.go - TVBox providers → JS crawler: runs JS sites
- TVBox providers → Source services: requests catalog
internal/provider/tvbox/drpy.go - Wails service → Live provider: loads live source
internal/shell/service.go - Live provider → Source services: loads playlists
- Wails service → Media library: serves library
internal/shell/service.go - Media library → SQLite state: reads and writes
internal/library/library.go - Media library → Poster generation: generates posters
internal/library/library.go - Wails service → Playback routing: prepares playback
internal/shell/service.go - Playback routing → Stream proxy: registers web streams
internal/playback/controller.go - Playback routing → Player interface: loads mpv streams
internal/playback/controller.go - mpv manager → mpv process: creates process
internal/player/mpvplugin/manager.go - Wails service → mpv manager: manages mpv
internal/shell/service.go - Web playback → Track controls: uses track state
frontend/src/components/PlaybackView.vue - App workflow → Web playback: renders playback
frontend/src/App.vue - App workflow → Playback automation: coordinates playback
frontend/src/App.vue - App workflow → Donation list: shows donors
frontend/src/App.vue - Wails service → SQLite state: persists app state
internal/shell/service.go - SQLite state → SQLite database: stores records