How salimovone/watchtorrent works
WatchTorrent is a cross-platform MAUI torrent catalog, downloader, and player backed by an in-process libtorrent engine. The main user flow is search or browse catalog listings, open a torrent’s details, add its magnet to downloads, then stream a selected file through a local HTTP endpoint to VLC. TorrentReader is also a reusable catalog/search subsystem. Playback, native-engine internals, and several integrations are represented from README claims where their implementation was not sampled; the graph avoids asserting unshown call relationships.
Main entry points: TorrentClient.cs Catalog client · LibtorrentEngine.cs Libtorrent adapter · DownloadService.cs Download coordinator · SearchProvider.cs Torrent search
Components 29
Torrent catalog
- Catalog client
TorrentReader/TorrentClient.cs - Torrent search
TorrentReader/Search/SearchProvider.cs - Search parsing
TorrentReader/Search/SearchTransformer.cs - Site HTTP
TorrentReader/Http/HttpProvider.cs - Listing parsing
TorrentReader/Overview/OverviewTransformer.cs - Category listings
TorrentReader/Providers - Torrent detail fetch
TorrentReader/Torrent/Provider/TorrentDetailProvider.cs - Detail parsing
TorrentReader/Torrent/Transformer/TorrentDetailTransformer.cs - Cloudflare clearance
TorrentReader/Http/CloudflareClearance.cs
App experience
- Search UI
WatchTorrent/Views/SearchPage.xaml.cs - Search state
WatchTorrent/ViewModels/SearchViewModel.cs - Discover listings
WatchTorrent/ViewModels/DiscoverViewModel.cs - Torrent detail state
WatchTorrent/ViewModels/TorrentDetailViewModel.cs - Navigation and watch
WatchTorrent/Views/Routes.cs - Downloads UI state
WatchTorrent/ViewModels/DownloadsViewModel.cs - Poster lookup
WatchTorrent/Services/PosterService.cs
Torrent engine
- Download coordinator
WatchTorrent/Services/DownloadService.cs - Download state
WatchTorrent/Services/DownloadItem.cs - Torrent session model
WatchTorrent.Core/TorrentSession.cs - Magnet parsing
WatchTorrent.Core/Magnet.cs - Libtorrent adapter
WatchTorrent.Libtorrent/LibtorrentEngine.cs - Native libtorrent bridge
native/bridge.cpp
Playback and sharing
- Player UI
WatchTorrent/Views/PlayerPage.xaml.cs - Player state
WatchTorrent/ViewModels/PlayerViewModel.cs - Range stream server
WatchTorrent/Services/TorrentMediaServer.cs - VLC playback
- Watch-together session
WatchTorrent/Services/WatchSession.cs
Other components
- User
- IMDb suggestions
Connections 30
- User → Search UI: searches
- Search UI → Search state: uses state
WatchTorrent/Views/SearchPage.xaml.cs - Search state → Catalog client: requests results
WatchTorrent/ViewModels/SearchViewModel.cs - Catalog client → Torrent search: delegates search
TorrentReader/TorrentClient.cs - Torrent search → Site HTTP: fetches HTML
TorrentReader/Search/SearchProvider.cs - Torrent search → Search parsing: transforms results
TorrentReader/Search/SearchProvider.cs - Search parsing → Listing parsing: reuses parsing
TorrentReader/Search/SearchTransformer.cs - Catalog client → Category listings: exposes listings
TorrentReader/TorrentClient.cs - Catalog client → Torrent detail fetch: fetches details
TorrentReader/TorrentClient.cs - Torrent detail fetch → Detail parsing: transforms detail
- Discover listings → Catalog client: loads listings
- User → Discover listings: browses
- User → Torrent detail state: opens torrent
- Torrent detail state → Navigation and watch: starts watching
- Navigation and watch → Player UI: navigates
WatchTorrent/Views/Routes.cs - User → Downloads UI state: manages downloads
- Downloads UI state → Download coordinator: controls downloads
- Download coordinator → Libtorrent adapter: manages sessions
WatchTorrent/Services/DownloadService.cs - Download coordinator → Download state: tracks items
WatchTorrent/Services/DownloadService.cs - Libtorrent adapter → Torrent session model: implements engine
WatchTorrent.Libtorrent/LibtorrentEngine.cs - Libtorrent adapter → Magnet parsing: parses magnet
WatchTorrent.Libtorrent/LibtorrentEngine.cs - Libtorrent adapter → Native libtorrent bridge: calls native ABI
- Navigation and watch → Download coordinator: adds shared torrent
WatchTorrent/Views/Routes.cs - Player UI → Player state: uses playback state
- Player state → Range stream server: requests stream
- Range stream server → Libtorrent adapter: reads torrent pieces
- Range stream server → VLC playback: serves HTTP ranges
- Player UI → Watch-together session: coordinates viewing
- Poster lookup → IMDb suggestions: looks up posters
WatchTorrent/Services/PosterService.cs - Catalog client → Cloudflare clearance: exposes clearance
TorrentReader/TorrentClient.cs