How futo-org/grayjay.desktop works
Grayjay Desktop is a multi-platform media application whose plugin integrations unify content from different platforms. The main user workflow is browsing recommendations or searching, opening channel/content details, and watching media; plugins supply platform content while the desktop interface presents it. Distinct capabilities include source management, downloads and export, casting, subscriptions/history, and device sync. The sampled excerpts establish server startup, platform-client initialization, and several controller responsibilities; many feature links below are documented by the README or are dashed where implementation wiring was not shown.
Main entry points: index.tsx Web interface · DetailsController.cs Content details · StatePlatform.cs Platform clients · DownloadController.cs Downloads and export
Components 21
Desktop experience
- Web interface
Grayjay.Desktop.Web/src/index.tsx - Local server
Grayjay.ClientServer/GrayjayServer.cs - Home and search
Grayjay.ClientServer/Controllers/HomeController.cs
Content and playback
- Content details
Grayjay.ClientServer/Controllers/DetailsController.cs - Media player
Grayjay.Desktop.Web/src/components/player/VideoPlayerView/index.tsx - Downloads and export
Grayjay.ClientServer/Controllers/DownloadController.cs - Casting
Grayjay.ClientServer/Controllers/CastingController.cs - Live chat
Grayjay.ClientServer/LiveChat/LiveChatManager.cs
Platform integrations
- Source plugins
Grayjay.ClientServer/States/StatePlugins.cs - Platform clients
Grayjay.ClientServer/States/StatePlatform.cs - Client pool
Grayjay.ClientServer/Pooling/PlatformClientPool.cs - Subscriptions
Grayjay.ClientServer/States/StateSubscriptions.cs
Application services
- Media proxy
Grayjay.ClientServer/Proxy/HttpProxy.cs - SABR streaming
Grayjay.ClientServer/Sabr/SabrSession.cs - Device sync
Grayjay.ClientServer/Sync/GrayjaySyncHandlers.cs - Application settings
Grayjay.ClientServer/Settings/GrayjaySettings.cs
State and persistence
- Application lifecycle
Grayjay.ClientServer/States/StateApp.cs - History
Grayjay.ClientServer/States/StateHistory.cs - Download state
Grayjay.ClientServer/States/StateDownloads.cs - SQLite database
Grayjay.ClientServer/Database/DatabaseConnection.cs
Other components
- Desktop user
Connections 24
- Desktop user → Web interface: browses
- Web interface → Local server: requests
- Local server → Web interface: serves interface
- Web interface → Home and search: searches
- Web interface → Content details: opens content
- Content details → Platform clients: resolves content
Grayjay.ClientServer/Controllers/DetailsController.cs - Platform clients → Client pool: uses clients
Grayjay.ClientServer/Pooling/PlatformClientPool.cs - Platform clients → Source plugins: loads scripts
Grayjay.ClientServer/States/StatePlatform.cs - Platform clients → Home and search: provides recommendations
Grayjay.ClientServer/States/StatePlatform.cs - Content details → Media player: provides playback
- Content details → Media proxy: registers media route
Grayjay.ClientServer/Controllers/DetailsController.cs - Media proxy → SABR streaming: streams segments
- Content details → Live chat: manages chat
Grayjay.ClientServer/Controllers/DetailsController.cs - Web interface → Downloads and export: manages downloads
- Downloads and export → Platform clients: gets video details
Grayjay.ClientServer/Controllers/DownloadController.cs - Downloads and export → Download state: starts downloads
Grayjay.ClientServer/Controllers/DownloadController.cs - Web interface → Casting: casts media
- Web interface → Subscriptions: manages subscriptions
- Content details → History: records viewing
Grayjay.ClientServer/Controllers/DetailsController.cs - Desktop user → Device sync: syncs devices
- Device sync → Subscriptions: syncs subscription data
Grayjay.ClientServer/Sync/GrayjaySyncHandlers.cs - Device sync → History: syncs history
Grayjay.ClientServer/Sync/GrayjaySyncHandlers.cs - Application lifecycle → SQLite database: initializes storage
Grayjay.ClientServer/States/StateApp.cs - Desktop user → Application settings: configures