How layzxz/bitchord-flac-addon works
BitChord clients request a manifest, search for audio, or resolve an item to a stream URL. The search workflow queries Internet Archive audio records, resolves candidate metadata, selects actual FLAC files, and formats matching tracks; stream requests reuse FLAC resolution. The implementation is concentrated in server.py, so nodes distinguish its runtime responsibilities rather than implying separate modules. The excerpt shows the relevant calls; Internet Archive is an external service.
Main entry points: server.py Search handler
Components 15
Addon HTTP API
- Manifest endpoints
server.py - Health endpoint
server.py - Search route
server.py - Stream routes
server.py
Archive Discovery
- Search handler
server.py - IA search API
- Track formatter
server.py
FLAC Resolution
- Item FLAC resolver
server.py - IA metadata API
- FLAC inspector
server.py - Header probe
server.py - IA file downloads
- Stream handler
server.py - Quality labeling
server.py
Other components
- BitChord client
Connections 16
- BitChord client → Manifest endpoints: requests
server.py - BitChord client → Health endpoint: checks
server.py - BitChord client → Search route: searches
server.py - BitChord client → Stream routes: resolves
server.py - Search route → Search handler: dispatches
server.py - Search handler → IA search API: queries
server.py - Search handler → Item FLAC resolver: resolves candidates
server.py - Item FLAC resolver → IA metadata API: fetches metadata
server.py - Item FLAC resolver → FLAC inspector: submits inspection
server.py - FLAC inspector → Header probe: probes missing details
server.py - Header probe → IA file downloads: reads file header
server.py - Search handler → Track formatter: formats matches
server.py - Track formatter → Quality labeling: labels quality
server.py - Stream routes → Stream handler: dispatches
server.py - Stream handler → Item FLAC resolver: resolves item
server.py - Stream handler → Quality labeling: labels quality
server.py