Skip to content

Show HN: Free, open-source native macOS client for di.fm

github.com/drmikexo2
6 pointsthucydides1 comment
On HN

I built a menu bar app for streaming DI.FM internet radio on macOS. Swift/SwiftUI, no Electron.

The existing options for DI.FM on desktop are either the web player (yet another browser tab) or unofficial Electron wrappers that idle at 200+ MB of RAM to play an audio stream. This sits in the menu bar at ~35 MB RAM and 0% CPU. The .app is about 1 MB.

What it does: browse and search stations, play/pause, volume, see what's playing (artwork, artist, track, time), pick stream quality (320k MP3, 128k AAC, 64k AAC). Media keys work. It remembers your last station.

Built with AVPlayer for streaming, MenuBarExtra for the UI, MPRemoteCommandCenter for media key integration. The trickiest part was getting accurate elapsed time. DI.FM's API and the ICY stream metadata don't always agree, so there's a small state machine that reconciles the two sources.

macOS 14+ required. You need a DI.FM premium account for the high-quality streams.

Source and binary: https://github.com/drmikexo2/DIBar-macOS

Comments

Huh, never heard of it. Would like something like this for SomaFM though

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.