Conversation
- 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
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)
- 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
…thError 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 pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive streaming support via KEF's Airable integration, including:
New Commands
Radio (
kefw2 radio)radio play <station>- Play a radio stationradio favorites- List favorite stationsradio popular,local,trending,hq,new- Browse radio categoriesradio search <query>- Search for stationsPodcasts (
kefw2 podcast)podcast play <show/episode>- Play a podcast episodepodcast favorites- List favorite podcastspodcast popular,trending,history- Browse podcast categoriespodcast search <query>- Search for podcastsShow Name/Episode NamesyntaxUPnP (
kefw2 upnp)upnp browse [path]- Browse UPnP media serversupnp play <path>- Play media from UPnP serverupnp servers- List available media serversQueue Management (
kefw2 queue)queue list- Show current play queuequeue add <item>- Add items to queuequeue clear- Clear the queuequeue save/load- Save and load queue presetsqueue playmode- Set repeat/shuffle modesCache Configuration (
kefw2 config cache)config cache- Show all cache settingsconfig cache enable/disable- Toggle cachingconfig cache ttl-*- Configure TTL per service typettl-defaultsetting for future servicesTechnical Highlights
kefw2/airable.go,airable_*.go) - Full client for KEF's Airable servicekefw2/cache.go,cmd/cache.go) - Configurable per-service TTL caching for fast tab completioncmd/completion_helpers.go) - Smart path-based tab completion with colon escaping for zsh compatibilitycmd/content_picker.go) - TUI browser for content selectionFiles Changed
kefw2/airable*.go,kefw2/queue.go,kefw2/cache.gocmd/kefw2/cmd/{radio,podcast,upnp,queue,cache}.go