How dathabe/mediarelay works
MediaRelay accepts supported media URLs from console input or clipboard polling, extracts source-specific media and metadata in a browser, normalizes them into relay payloads, stores the resources, and sends them to configured targets such as Immich. The graph preserves the documented Pixiv, Twitter, and HeyBox branches. Several core implementations were not sampled, so links for those stages follow the README and module boundaries rather than inspected call sites.
Main entry points: ContentExtractorFactory.cs Extractor Factory · ContentRelayService.cs Content Relay · UrlRelayService.cs URL Relay Service · MessageOrchestrator.cs Message Orchestrator
Components 19
URL Inputs
- Console Input
src/MediaRelay.Console/ConsoleInputUrlBackgroundService.cs - Clipboard Poller
src/MediaRelay.Clipboard/ClipboardUrlBackgroundService.cs
URL Processing
- Message Orchestrator
src/MediaRelay/Messaging/MessageOrchestrator.cs - URL Message Queue
src/MediaRelay.Url/Messaging/Queue/UrlMessageQueue.cs - URL Queue Consumer
src/MediaRelay.Url/Messaging/Queue/UrlMessageQueueConsumer.cs - URL Relay Service
src/MediaRelay.Url/UrlRelayService.cs
Media Sources
- Playwright Browser
src/MediaRelay/Browser/ChromiumBrowserService.cs - Pixiv Extractor
src/MediaRelay.Pixiv/Artwork/ArtworkContentExtractor.cs - Twitter Extractor
src/MediaRelay.Twitter/Tweet/TweetContentExtractor.cs - HeyBox Extractor
src/MediaRelay.HeyBox/BbsLink/LinkContentExtractor.cs
Relay Core
- Extractor Factory
src/MediaRelay/Content/ContentExtractorFactory.cs - Content Relay
src/MediaRelay/ContentRelayService.cs - Payload Factory
src/MediaRelay/Payload/PayloadFactory.cs - Payload Relay
src/MediaRelay/PayloadRelayService.cs
Media Storage
- Resource Storage
src/MediaRelay/Storage/Resource/ResourceStorage.cs - Media Repository
src/MediaRelay/Storage/Media/MediaRepository.cs
Relay Targets
- Immich Handler
src/MediaRelay.Immich/ImmichRelayHandler.cs - Immich API
Other components
- User
Connections 21
- User → Console Input: enters URL
- User → Clipboard Poller: copies URL
- Console Input → Message Orchestrator: sends URL message
- Clipboard Poller → Message Orchestrator: sends URL message
- Message Orchestrator → URL Message Queue: enqueues message
- URL Message Queue → URL Queue Consumer: dispatches message
- URL Queue Consumer → URL Relay Service: handles URL
- URL Relay Service → Extractor Factory: requests extraction
- Extractor Factory → Pixiv Extractor: selects extractor
- Extractor Factory → Twitter Extractor: selects extractor
- Extractor Factory → HeyBox Extractor: selects extractor
- Pixiv Extractor → Playwright Browser: extracts via browser
- Twitter Extractor → Playwright Browser: extracts via browser
- HeyBox Extractor → Playwright Browser: extracts via browser
- URL Relay Service → Content Relay: relays extracted content
- Content Relay → Payload Factory: creates payload
- Content Relay → Resource Storage: stores resources
- Resource Storage → Media Repository: writes media
- Content Relay → Payload Relay: dispatches payload
- Payload Relay → Immich Handler: handles payload
- Immich Handler → Immich API: uploads and updates