Skip to content

Conversation

@ELowry
Copy link

@ELowry ELowry commented Dec 9, 2025

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 like and dislike actions 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 globalHasAppliedOnce flag 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.
  • 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.

CalG24 and others added 3 commits December 8, 2025 15:00
This commit integrates changes proposed by @CalG24 in issue pear-devs#922 to enhance
desktop integration and fix playback issues.

Changes include:

1. Interactive Notifications (Windows):
   - Added interactive buttons to toast notifications: Like, Dislike,
     Previous, Play/Pause, and Next.
   - Implemented state awareness so notification icons (filled vs outline)
     reflect the actual song status.
   - Added logic to refresh notifications on interaction rather than
     dismissing them.

2. Shortcuts:
   - Added support for 'Like' and 'Dislike' in global and local
     shortcuts.
   - Added a global shortcut tracker to handle state changes and
     trigger notifications appropriately.

3. Autoplay & Startup Fixes:
   - Implemented a `globalHasAppliedOnce` flag in the disable-autoplay
     plugin to prevent audio "blasts" on startup.
   - Added early muting/pausing logic in the renderer to catch audio
     streams before plugin initialization.
   - Improved queue management to ensure subsequent videos play automatically
     after the initial pause.

4. Localization:
   - Added translation strings for "Like" and "Dislike" across all
     supported languages.

> I am providing this code on behalf of CalG24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants