From d194cfd2a413ce167fd687cb857913097a970116 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sun, 1 Feb 2026 22:42:01 +0100 Subject: [PATCH] Enhance verbose mode for 'play now' command with additional API details - Add container art URL display in verbose mode - Show shuffle and repeat settings - Display track ID for streaming services - Include art image status and URL details - Add capabilities section showing available controls (skip, favorite, seek) - Organize verbose output in logical sections for better readability - All additional details match those available via direct curl API calls --- cmd/soundtouch-cli/cmd_playback.go | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/cmd/soundtouch-cli/cmd_playback.go b/cmd/soundtouch-cli/cmd_playback.go index b5eddf0..1d20072 100644 --- a/cmd/soundtouch-cli/cmd_playback.go +++ b/cmd/soundtouch-cli/cmd_playback.go @@ -102,6 +102,10 @@ func printContentDetails(nowPlaying *models.NowPlaying, verbose bool) { fmt.Printf("\nContent Details:\n") printContentLocation(nowPlaying.ContentItem) printVerboseContentInfo(nowPlaying, verbose) + + if verbose { + printVerbosePlaybackDetails(nowPlaying) + } } // printContentLocation prints the content location @@ -125,9 +129,47 @@ func printVerboseContentInfo(nowPlaying *models.NowPlaying, verbose bool) { fmt.Printf(" Item Name: %s\n", nowPlaying.ContentItem.ItemName) } + if nowPlaying.ContentItem.ContainerArt != "" { + fmt.Printf(" Container Art: %s\n", nowPlaying.ContentItem.ContainerArt) + } + fmt.Printf(" Presetable: %t\n", nowPlaying.ContentItem.IsPresetable) } +// printVerbosePlaybackDetails prints detailed playback information in verbose mode +func printVerbosePlaybackDetails(nowPlaying *models.NowPlaying) { + fmt.Printf("\nPlayback Details:\n") + + // Shuffle and repeat settings + if nowPlaying.ShuffleSetting != "" { + fmt.Printf(" Shuffle: %s\n", nowPlaying.ShuffleSetting.String()) + } + + if nowPlaying.RepeatSetting != "" { + fmt.Printf(" Repeat: %s\n", nowPlaying.RepeatSetting.String()) + } + + // Track ID + if nowPlaying.TrackID != "" { + fmt.Printf(" Track ID: %s\n", nowPlaying.TrackID) + } + + // Art details + if nowPlaying.Art != nil { + fmt.Printf(" Art Image Status: %s\n", nowPlaying.Art.ArtImageStatus) + if nowPlaying.Art.URL != "" { + fmt.Printf(" Art URL: %s\n", nowPlaying.Art.URL) + } + } + + // Capabilities + fmt.Printf("\nCapabilities:\n") + fmt.Printf(" Skip Enabled: %t\n", nowPlaying.CanSkip()) + fmt.Printf(" Skip Previous Enabled: %t\n", nowPlaying.CanSkipPrevious()) + fmt.Printf(" Favorite Enabled: %t\n", nowPlaying.CanFavorite()) + fmt.Printf(" Seek Supported: %t\n", nowPlaying.IsSeekSupported()) +} + // printPlaybackStatus prints special status messages func printPlaybackStatus(nowPlaying *models.NowPlaying) { if nowPlaying.PlayStatus == models.PlayStatusBuffering {