Commit Graph

3 Commits

Author SHA1 Message Date
68800cf823 feat(sounds): add per-JID mute support and enhance playback behavior
Some users requested the ability to mute notifications from specific JIDs
without disabling all sounds. This change introduces `mute` and `unmute`
commands to allow fine-grained control over sound playback.

While implementing this, the sound path expansion logic was improved by
switching to `pathlib` with `lru_cache` for efficiency and clarity.
Playback is now also rate-limited to avoid overlapping audio triggers
from rapid message bursts.

This lays the groundwork for more user-specific customization of sound
notifications while keeping the experience smooth and reliable.

Additionally the bug with ignoring sound's `kind` was fixed: now the plugin respects specific sounds set for rooms, chats and private messages within rooms.

Finally, code was formatted via Black to avoid ambiguity in the formatting.
2025-07-06 02:16:39 +02:00
Jason Hensley
ade6439157 Add several new commands to the sounds.py plugin:
- /sounds set audioplayer <cmd>

  Allows configuring any CLI tool to be used for audio playback.  This
opens up the ability to play media types beyond mpeg3.

- /sounds reset audioplayer

  Resets the audio player to the default of "mpg123 -q".

- /sounds test chat|room|private

  Tests the /sounds setup to ensure the expected sounds will play on the
proper events.
2024-04-23 10:58:23 -04:00
James Booth
148c4b3ee1 Restructure project 2016-11-13 17:01:39 +00:00