Commit 21e60a3
authored
Add Airable streaming support: Radio, Podcasts, and UPnP (#20)
* airable streaming; radio, podcasts and UPnP servere
* Update readme and changelog
* Bumped the year
* Updates
* Event tracking
* Refactor: Add command factories to reduce code duplication
- Add MakeCategoryCommand factory for radio category commands
- Add MakePodcastCategoryCommand factory for podcast category commands
- Add MakeStationCompletion and MakePodcastCompletion factories
- Add HandlePickerResult shared result handler
- Replace 5 radio commands and 3 podcast commands with factory calls
- Net reduction of ~930 lines of duplicated code
* Cleanup: Remove unused code and consolidate duplicates
Removed unused code:
- cacheConfigSettings variable (config_cache.go)
- loadingMsg type (radio.go)
- upnpContainerStyle, upnpAudioStyle variables (upnp.go)
- FilterItemsByType function (completion_helpers.go)
- DiscoverSpeakersLegacy function (kefw2/discover.go)
- RadioStation, Podcast, PodcastEpisode, MediaServer, UPnPTrack type structs
- GetRadioHistory, GetRadioRecommendations methods (kefw2/airable_radio.go)
Consolidated duplicates:
- parseDisplayPath: merged radio and podcast versions into airable.go
- findItemByName: replaced findStationByName and findPodcastByName
Net reduction: 119 lines (71 added, 190 removed)
* Refactor: Unify radio/podcast Airable services and add CLI error helpers
- Create airable_service.go with unified service abstraction for radio/podcast
- Reduce airable_radio.go from 622 to 221 lines (-64%)
- Reduce airable_podcast.go from 537 to 185 lines (-66%)
- Add exitOnError/exitWithError helpers to reduce CLI boilerplate
- Apply error helpers across 10 CLI command files
- Consolidate findItemByName with optional type filtering
- Remove unused pp dependency and clean up examples
- Remove commented scaffolding code from root.go
* refactor(cli): replace verbose error handling with exitOnError/exitWithError helpers
- Convert os.Exit(1) patterns across 10 CLI command files
- Use centralized exitOnError() for error checking with message
- Use exitWithError() for unconditional error exits
- Remove 289 lines of boilerplate error handling code
- Build and tests pass1 parent 5226825 commit 21e60a3
50 files changed
Lines changed: 10213 additions & 229 deletions
File tree
- .opencode/plans
- cmd/kefw2
- cmd
- docs
- examples/get_info
- kefw2
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
This file was deleted.
0 commit comments