Add Star Ratings, Enhance Security, and Improve User Experience#6
Add Star Ratings, Enhance Security, and Improve User Experience#6DreadHeadHippy wants to merge 14 commits intorackemrack:mainfrom
Conversation
Features: - Star rating control via dial with half-star and full-star modes - Debounced rating saves (2-second idle timer) - Real-time star display with Unicode characters (★☆⯨) - Success/error feedback on Stream Deck display - Rating persistence to Plex server Bug Fixes: - Fixed overlay reversion issues (volume, next/prev, rating) - Corrected layout geometry to prevent element overlap - Added protection against timeline poll overwrites Improvements: - Enhanced user feedback with on-device error messages - Updated documentation (CHANGELOG, README) - Version bumped to 1.2.0 across all files
- Improve credential handling in network requests - Add URL validation for user-provided endpoints - Strengthen connection security requirements - Update error handling and user feedback
|
Thanks for this! Will check it out when I have some time this weekend. |
|
My pleasure! I have more details regarding security if you want to reach out privately. This PR was left vague intentionally. Thanks for the plugin! |
- New Rating button action with three display styles (stars/numeric/both) - Configurable font size (32-56px) and rating mode (half/full stars) - Smart per-track caching fixes rating persistence issue - Numeric display intelligently formats (4/5 not 4.0/5, 4.5/5 for half stars) - Removed redundant 'SAVED!' overlay for cleaner UX - Works on all Stream Deck models with LCD keys
|
Hey @rackemrack! 👋 First off, I just want to say I absolutely love this plugin! You created something really useful for the Plex + Stream Deck community. I've been having a blast using it and wanted to contribute some improvements to make it even better. While you're reviewing the v1.2.0 PR (no rush at all!), I got excited and kept building. I've put together v1.3.0 with a new Rating button and some fixes. Wanted to share what I've been working on! What's New in v1.3.0🆕 Rating ButtonAdded a dedicated Rating button action that shows the current track's star rating. Users can now rate tracks with a single tap on any Stream Deck model (not just Stream Deck+ with dials). Features:
🐛 Critical Fix: Rating PersistenceSolved a major issue where ratings would appear to save but then revert to zero after 3-10 seconds. The Problem: The Solution:
Result: Ratings now persist correctly without reverting. No more confusion! ✨ 🎨 UX Refinement
Testing Status✅ Button rating cycles correctly (half-star and full-star modes) Release Statusv1.3.0 is now live! 🎉 You can find it here: https://github.com/DreadHeadHippy/ampdeck/releases/tag/v1.3.0 I went ahead and published it on my fork so people can use it right away. I figured that way there's no pressure on you to rush - users get the improvements immediately, and you can review whenever you have time. Next Steps (Totally Up to You!)I have two options for getting these changes to you, and I'm happy to do whatever fits your workflow best: Option 1: I can wait Option 2: PR whenever you're ready Let me know what you prefer, or if there's a different approach that works better for you! Why I'm Excited About ThisI'm really happy with how this turned out! The Rating button makes rating accessible on all Stream Deck models, not just the Stream Deck+. While building it, I noticed ratings would sometimes revert after saving, so I fixed that with the smart caching system. Together, they make rating tracks way smoother. Seriously though, thanks for building this plugin. It's exactly what the Plex community needed, and I'm happy to help make it even better. Take your time with reviews - I'm just excited to contribute! 🎵 — DreadHeadHippy |
|
Hey @rackemrack! So... I may have gotten a little carried away after v1.3.0 and found a few bugs to squash. 😅 Released v1.3.1 as a quick patch to fix four issues: What's Fixed
Why This MattersThe third one is actually pretty important - prevents user frustration when they rate tracks quickly while listening. The debouncing still works great for adjusting ratings on a single track (prevents API spam), but now we don't lose data when people skip around their library. No Pressure!Just wanted to keep you in the loop. Take your time reviewing v1.2.0 and v1.3.0 - these are all just improvements building on your awesome foundation. Everything's published on my fork so users can grab it whenever, and you can merge whenever works for you. Hope you're doing well! — DreadHeadHippy |
- Fixed touch strip text color (content now uses chosen color instead of always grey) - Fixed rating button text positioning (properly centered at all font sizes) - Fixed rating loss on quick track changes (immediate flush on track switch) - Fixed rating button API spam (now uses 2-second debounce like dial) - Performance: Efficient debouncing with no additional polling overhead
- Track Info: bitrate now uses accent color (22px bold), optimized positioning - Time Elapsed: total time uses accent color (36px bold), repositioned progress bar - Rating: increased label to 26px bold - Improved visual hierarchy and spacing across all tiles
Added downloads badge to README.
…pdeck to com.dreadheadhippy.ampdeck
There was a problem hiding this comment.
Pull request overview
This PR adds a star rating system for tracks and implements security improvements by moving authentication from URL parameters to HTTP headers. The changes introduce dial-based and button-based rating controls with visual feedback, URL validation for configuration inputs, and updates the installation process to use a .streamDeckPlugin file.
Changes:
- Added star rating feature with dial controls, rating button, and configurable half-star/full-star modes
- Enhanced security by moving Plex token authentication from URL query parameters to HTTP headers
- Added URL validation with protocol restrictions and HTTPS requirements for remote servers
- Updated installation documentation to use
.streamDeckPlugindistribution file
Reviewed changes
Copilot reviewed 9 out of 30 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| install.sh | Version bumped to v1.3.1 |
| install.bat | Version bumped to v1.3.1 |
| com.rackemrack.ampdeck.sdPlugin/plugin.js | Core rating functionality, security improvements, debug logging, header-based auth, rating caching logic |
| com.rackemrack.ampdeck.sdPlugin/pi.html | Added rating button settings UI, URL validation in property inspector |
| com.rackemrack.ampdeck.sdPlugin/pi-strip.html | Added rating mode selector for dial, URL validation in strip property inspector |
| com.rackemrack.ampdeck.sdPlugin/manifest.json | Version update to 1.3.1, new rating action definition |
| com.rackemrack.ampdeck.sdPlugin/imgs/rating-icon.svg | New icon for rating button action |
| com.dreadheadhippy.ampdeck.streamDeckPlugin | Packaged plugin file for simplified installation |
| README.md | Updated installation instructions, added rating feature documentation |
| CHANGELOG.md | Comprehensive changelog entries for v1.3.1, v1.3.0, and v1.2.0 |
| .gitignore | Added exclusion for personal notes file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
README.md
Outdated
| 3. **Close Stream Deck completely** | ||
| 4. Run `install.bat` (Windows) or `./install.sh` (macOS) — same as initial install | ||
| 5. Start Stream Deck | ||
| 1. Download the latest **`install.bat`** from the [Releases](https://github.com/rackemrack/ampdeck/releases) page |
There was a problem hiding this comment.
The "Updating" instructions reference downloading "install.bat" but this appears to be inconsistent with the "Installation" section which uses the .streamDeckPlugin file. For updating an existing plugin, users should typically download the same .streamDeckPlugin file, not install.bat. The README should clarify whether updates use the .streamDeckPlugin file or the install scripts.
| 1. Download the latest **`install.bat`** from the [Releases](https://github.com/rackemrack/ampdeck/releases) page | |
| 1. Download the latest **`com.dreadheadhippy.ampdeck.streamDeckPlugin`** from the [Releases](https://github.com/rackemrack/ampdeck/releases) page |
README.md
Outdated
| 1. Download the latest release from the [Releases](https://github.com/rackemrack/ampdeck/releases) page | ||
| 2. Extract the zip | ||
| 3. **Close Stream Deck completely** | ||
| 1. Download **`com.dreadheadhippy.ampdeck.streamDeckPlugin`** from the [Releases](https://github.com/rackemrack/ampdeck/releases) page |
There was a problem hiding this comment.
There's a discrepancy between the repository reference in the README and the actual GitHub organization. The URL references "rackemrack/ampdeck" but based on the file name "com.dreadheadhippy.ampdeck.streamDeckPlugin" and the PR metadata showing this is from DreadHeadHippy, this may need to be updated to point to the correct repository URL.
Updated README to indicate project relocation and new repository.
Overview
This PR adds a highly requested feature, implements critical security improvements, and streamlines the installation process. All changes maintain backward compatibility with existing setups while significantly improving the plugin's security posture.
🌟 New Features
Star Rating System
User experience:
dialActionto "rating" in strip settings🔒 Security Improvements
Enhanced API Security ⭐ IMPORTANT
Modernized authentication and network communication to follow current security best practices.
Improvements:
Implementation:
Input Validation and Security Hardening
Strengthened input validation to protect against malformed configurations and potential security issues.
Protections added:
Implementation:
validateUrl()function with safety checksConnection Security Requirements
Implemented smart security requirements that balance protection with usability.
Security policy:
Benefits:
🎯 Improvements
Installation Process
.streamDeckPluginand double-clickBug Fixes
Developer Experience
Secure Connection Requirements for Remote Servers
Impact: Remote Plex servers now require secure connections
Migration:
Rationale: Following modern security standards and best practices for protecting user credentials and data.
Affected users: Small subset of users connecting to internet-facing Plex servers over insecure protocols. Local and private network users are unaffected.
🧪 Testing Completed
.streamDeckPluginfile📋 Files Changed
Core Plugin Logic:
com.rackemrack.ampdeck.sdPlugin/plugin.js(+226 lines, -34 lines)Property Inspectors:
com.rackemrack.ampdeck.sdPlugin/pi.html(+31 lines, -2 lines)com.rackemrack.ampdeck.sdPlugin/pi-strip.html(+46 lines, -2 lines)Documentation:
README.md(-22 lines, +5 lines).streamDeckPlugindistributionDistribution:
com.rackemrack.ampdeck.streamDeckPluginfor easy installationTotal: ~340 lines changed across 4 files
🚀 Release Notes Template
📝 Additional Notes
Security Improvements
These changes implement modern security practices and align with current industry standards. Details have been kept appropriately high-level in public communications. Specific technical discussion available privately if needed for review purposes.
Backward Compatibility
All existing functionality preserved. Users with valid HTTPS or local HTTP configurations will see no changes in behavior.
Future Considerations
The security patterns established here (header-based auth, URL validation) provide a solid foundation for future enhancements.
🙏 Credits
Star rating implementation and security review by @DreadHeadHippy with AI assistance.
Original plugin and architecture by @rackemrack - thank you for creating this excellent foundation!
Ready to merge? This PR has been thoroughly tested and is ready for review. Happy to address any questions or concerns!