flecs
flecs copied to clipboard
feat: Interactive notifications, Like/Dislike shortcuts, and Autoplay fixes
Summary
This PR implements several features and fixes provided by @CalG24 as discussed in issue #922.
Disclaimer: I am submitting this code on behalf of the original author to facilitate the contribution process. I have packaged their changes into this commit but have not personally tested or reviewed the implementation logic.
Changes
1. Interactive Notifications (Windows)
- Interactive Toast: The notification toast now includes buttons for Like, Dislike, Previous, Play/Pause, and Next.
- State Awareness: The notification reflects the current state (filled heart for Liked, outline for Unliked) and updates the Play/Pause icon based on player state.
- Logic: Implemented logic to refresh the notification rather than dismissing it on click, and added debounce logic to prevent spamming.
2. Global & Local Shortcuts
- New Keybinds: Added Like and Dislike options to the Keybind configuration menu.
-
Implementation: Added logic to trigger
likeanddislikeactions via global and local shortcuts. - Responsiveness: Includes improvements for media key responsiveness (specifically for wireless headphones).
3. Autoplay / Startup Fixes
-
Startup "Blast" Fix: addressed the issue where music blasts for a split second on startup.
-
Fix: Added a
globalHasAppliedOnceflag to track if the pause has been applied globally. - Logic: Implemented immediate mute/pause logic in the renderer before plugins fully initialize to catch the stream early.
-
Fix: Added a
- Queue Management: Added logic to ensure that while the first video is paused on load (if configured), subsequent videos in the queue play automatically.
4. Localization (i18n)
- Added
"like"and"dislike"translation strings to all supported language files.
Notes on this submission
- Original Author: @CalG24
- Testing: As noted, this code is untested by the committer and is intended for full review and analysis.