You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance console application with media volume status and custom title support (#371)
This PR implements three user-requested enhancements to the SharpCaster
console application to improve the user experience and provide more
complete media information.
## Changes Made
### 1. Media Volume and Mute Status in Status Commands
Both the command-line `status` command and interactive mode "Get media
status" now display media stream volume information alongside the
existing device volume information.
**Command-line example:**
```bash
$ sharpcaster "Living Room TV" status
Device: Living Room TV
Volume: 75% (Muted: False) # Device volume
Media State: Playing
Title: Big Buck Bunny
Current Time: 45.2s
Duration: 120.0s
Progress: 37.7%
Media Volume: 80% (Muted: False) # NEW: Media stream volume
```
**Interactive mode enhancement:**
The status table in Media Controls → "Get media status" now includes:
- Media Volume: Shows the media stream volume level
- Media Muted: Shows whether the media stream is muted
### 2. Custom Title Input for Custom URLs
When casting custom URLs in interactive mode, users can now specify a
custom title instead of being limited to the hardcoded "Custom Media"
title.
**User flow:**
```
? Select media to cast: Custom URL
? Enter media URL: https://example.com/my-video.mp4
? Enter media title (or press Enter for default): My Awesome Video
✅ Media loaded and playing successfully!
```
The title prompt allows empty input and defaults to "Custom Media" for
backward compatibility.
### 3. Navigation Menu Verification
Verified that all cast-related menus already have proper "Back to main
menu" options:
- ✅ Media Controls menu
- ✅ Queue Management menu
## Technical Details
- **Null-safe implementation**: Uses proper null-conditional operators
(`?.`) to handle cases where media volume information might not be
available
- **Consistent formatting**: Media volume uses the same percentage
formatting (`:P0`) as device volume for consistency
- **Error handling**: Gracefully displays "Not available" when media
volume information is unavailable
- **UI consistency**: Interactive mode uses Spectre.Console styling
patterns matching the existing codebase
## User Impact
These enhancements provide users with:
1. **Complete media information**: Both device and media stream volume
levels are now visible
2. **Better customization**: Custom titles for personal media improve
organization and identification
3. **Improved user experience**: More informative status displays and
intuitive navigation
The changes maintain backward compatibility and follow existing code
patterns for error handling and UI consistency.
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/Tapanila/SharpCaster/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* When casting a custom URL, you can now enter a custom media title;
pressing Enter uses the default “Custom Media.”
* Media status displays now include media-specific volume (as a
percentage) and mute state (Yes/No). If media volume data isn’t
available, a clear “Not available” message is shown.
* These updates appear in both the media controls view and console
status output for clearer, more informative playback feedback.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Tapanila <1529210+Tapanila@users.noreply.github.com>
0 commit comments