**1. Fixed Elapsed Time Extraction Order**
Problem: Code was using stale elapsed_time from current_media object
Solution: Now prioritizes top-level elapsed_time field first
- Top-level fields have the most current playback position
- current_media.elapsed_time is often stale/outdated
- Added logging to show which source is used
Before: elapsed_time: 0 (from stale current_media)
After: elapsed_time: 2.223 (from current top-level field)
**2. Queue Now Shows Only Current + Upcoming Tracks**
Problem: Queue displayed all 123 items including 24 already-played tracks
Solution: Filter queue to show only currentIndex onwards
- Sublist items from currentIndex to end
- Show "X tracks in queue" instead of total items
- First item is always the current track (highlighted)
- No more confusing history items in the queue view
Before: Items 0-23 (history) + 24 (current) + 25-122 (upcoming)
After: Items 24 (current) + 25-122 (upcoming only)
**3. Enhanced Play/Pause Debug Logging**
- Log when command is sent with player ID
- Log successful completion with response
- Log errors with full stack trace for debugging
- Will help diagnose why play/pause isn't working
This should fix the progress bar and queue view issues. Play/pause
logging will help identify that remaining issue.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>