top | item 47200919

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

6 points| thucydides | 1 day ago |github.com

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

1 comment

order

bl4kers|1 day ago

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