Releases: onegen-dev/audacious-discord-rpc
v2.3
Audacious Discord RPC version 2.3 is a minor update, mostly fixing oversights and minor issues from v2.2. The field sanitation is made UTF-8 aware, seeking will cause a RPC update, and RPC updates are now lock-guarded by a mutex (especially relevant for cover fetch tasks).
It also fixes inconsistent user agents between Linux (Audacious Discord RPC/2.3) and Windows (Audacious-Discord-RPC/2.3). Both operating systems now use Audacious-Discord-RPC/2.3. Self-compiled versions from master will show Audacious-Discord-RPC/master instead.
This release was planned for last week due to #8 problem, but was unfortunately delayed for a) RL j*b and b) attempts to add a reconnection mechanism to Discord. Unfortunately, as the used RPC library doesn’t allow re-initialising the IO handler, Audacious cannot reconnect, and thus must be started after Discord is already running. I will later try to explore other options to not make this a necessity (input, ideas or PRs are very welcome).
Compatibility
Compiled for Audacious 4.5.x on Linux and Windows (10 & 11).
x86 (Intel / AMD) architecture only.
Installation
Please find the included INSTALL.<platform>.txt file or the ‘Installation’ section in the README for installation instructions.
Changes
Diff: v2.2...v2.3
Additions
- 159e0a9 Seeking (manually changing position of a track) updates the RPC now
Fixes
- 6c6b8d2 Triggers RPC on direct execution (calls
playback_to_presenceafter connecting; #8) - 0785299 Made
field_sanitizeUTF-8 aware - ab720fa Unified user agent between Linux (cURL) and Windows (WinHTTP)
Other Changes
- e69935d Made RPC updates mutually exclusive with a mutex lock-guard
- 77d6ef7 Improved building guide in
README.md
Known issues
- Timestamps are not cleared properly when paused, resulting in an unfortunate counter of how long was the user idle (#2)
Any help with fixing this issues would be much appreciated! ❤️
v2.2
Audacious Discord RPC version 2.2 is a major release following 2.1b. It adds cover art fetching as a opt-in feature, the ability to choose Discord RPC status field and has many stability fixes, including a critical fix for segmentation faults on metadata-less files.
This version was originally planned for later December 2025, but the discovery of the critical SIGSEGV issue (#7) forced me to release this update earlier. The cover art fetching is still tagged as “unstable”, although there are no known issues with it (it is just more-less untested).
Compatibility
Compiled for Audacious 4.5.x on Linux and Windows (10 & 11).
x86 (Intel / AMD) architecture only.
Installation
Please find the included INSTALL.<platform>.txt file or the ‘Installation’ section in the README for installation instructions.
Changes
Diff: v2.1b...v2.2
Additions
- 4490197 (et al.) Implemented cover art fetching from MusicBrainz / Cover Art Archive (opt-in)
- 0fbf2e4 Uses a custom LRU string cache
- Uses cURL on Linux systems and WinHTTP on Windows
- c445113 Added a status display type selection option (#6 by @hrryt)
Fixes
- daf896c Stopped calling
playback_to_presencewhen Discord is not connected - d4cbf7a Added filename as a track title fallback (title-less files might have caused segmentation faults before)
- 397057a Resolved race condition in
cover_to_presence - cdb090c Removed overly strict compiler flags (resolved #5)
- 5753197 (et al.) Resolved various linter warnings (
clang-tidyand-pedantic)
Other Changes
- 86e338c Added
nlohmann/jsonas a dependency - 86e338c Added
libcurlas a dependency (Linux-only) - da7d813 Removed use of
std::stringfrom the main function
Known issues
- Timestamps are not cleared properly when paused, resulting in an unfortunate counter of how long was the user idle (#2)
Any help with fixing this issues would be much appreciated! ❤️
v2.2-pre2511C
Warning
This is a work-in-progress pre-release! Its additions are not yet vigorously tested and might cause crashes. Only use this version if you’re feeling adventurous! You’ve been warned!
The latest stable release is v2.1b.
Audacious Discord RPC pre2511C is the third pre-2.2 version that adds full Windows compatibility, better sanitisation for empty fields and the ability to choose what field is used for Discord RPC status.
Pre2511C is optimised with -Ofast. The previous pre-release did not use compiler optimisation on "Release" build types, while the last stable release v2.1b used -O3. "Debug" build types are always -Og (optimised for debugging, only applicable if you self-build this plugin that way).
A full stable 2.2 release is expected around late December 2025. Most things I want it to have are implemented, it’s mostly a matter of testing and optimising now. Due to a critical error that pre2511C resolved (#7), it is the final pre-release of 2.2. Version 2.2 was released around 17 hours after pre2511C.
Changes
Features
- c445113 Added a status display type selection option (#6 by @hrryt)
- 9f1edd1 Added full Windows compatibility
- a3136bc Added a retry mechanism to cover fetching (no more pause-play retries!)
Fixes
- daf896c Stopped calling
playback_to_presencewhen Discord is not connected - d4cbf7a Added filename as a track title fallback (title-less files might have caused segmentation faults before)
- 397057a Resolved race condition in
cover_to_presence - cdb090c Removed overly strict compiler flags (resolved #5)
Other Changes
- c5dccd4 Unified fetch timeout to 15 seconds on all platforms
- da7d813 Removed use of
std::stringfrom the main function - 3243605 Rewritten
field_sanitiseto use Audacious strings rather thanstd::string - d7aa33b Removed unused includes
- 5753197 Resolved various linter warnings (
clang-tidyand-pedantic)
Known Issues
- Fetches remain atomic albeit retried. If MB succeeds but CAA fails, the whole fetch fails and MB has to be re-queried. However, as LastFM fetching might be implemented later, it could cause problems later -- this issue will likely be deferred to potential 2.2.1.
- Timestamps are not cleared properly when paused, resulting in an unfortunate counter of how long was the user idle (#2).
v2.1b
Warning
A critical bug was found in metadata fetching and fixed in v2.2-pre2511C. Despite being a pre-release, I encourage you to use that version instead. A stable v2.2 is coming soon! Sorry! – onegen
Audacious Discord RPC version 2.1b is a recompilation of v2.1 with O3 optimisation and added support for Windows.
Compatibility
Compiled for Audacious 4.5.1 for Linux and Windows (10 & 11).
x86 (Intel / AMD) architecture only.
Installation
Please find the included INSTALL.<platform>.txt file or the ‘Installation’ section in the README for installation instructions.
Changes
Diff: v2.1...v2.1b
Known issues
- Timestamps are not cleared properly when paused, resulting in an unfortunate counter of how long was the user idle (#2)
Any help with fixing this issues would be much appreciated! ❤️
v2.2-pre2511B
Warning
This is a work-in-progress pre-release! Its additions are not yet tested. Only use this version if you’re feeling adventurous! You’ve been warned!
The latest stable release is v2.1.
Audacious Discord RPC pre2511B is the second pre-2.2 version, focused on improving the cover art fetcher introduced in pre2511A.
PS: I am aware that development significantly slowed down, but I have an exhausting corporate full-time j*b now and don’t get much free time or energy. 🙁 The cover fetching works, just HTTP likes to fail (ratelimit issues), caching isn’t as good as I want it to be yet, and it’s all kinda untested but it should work, so feel free to use it (and pls report bugs thx).
Changes
- Swapped cover art cache eviction policy from FIFO to LRU
- Changed MusicBrainz query to account for individual artist aliases and multi-artist album credit
- Resolved various
-pedanticg++warnings - Added a pre-emptive exit to CMake if running on WIN32 (see #4)
- Added compiler flags
-Wall -Werror -Wextra -pedanticas well as-DNDEBUG -O3 -march=nativefor release compilations - Added more debug logs to
cover-cache.hpp(temporary) - Moved header files from
srctoinclude
Resolved Issues
- Removed segmentation fault on Cover Art Archive error (attempted to access a JSON property that didn’t exist)
- Cache improved, better tested and ev. policy swapped for LRU as planned. Admission policy is not planned (as it increases origin reads, which we don’t want)
- MusicBrainz query now checks both
artistandartistname
Known Issues
- Fetching is one-try-only and maybe too atomic?
- Multiple tries, if the song is long enough? Would require some mechanism to tell the plugin to stop when certain there isn’t a cover or if the track is close to finish or something.
- Too atomic, as in “if one thing fails, all do” – if MusicBrainz call succeeds but CAA fails, everything has to be re-fetched anew. Theoretically, cache could be adjusted to store obtained CAA URL to re-try (so MB doesn’t have to be called again) – and furthermore if it turns out there is no MB release or CAA cover for the album, that can be caches too so the plugin doesn’t uselessly try again (perhaps with lower TTL?)
- I think the
max_itemsis misbehaving, but that’s just a hunch. - Windows remains unsupported (#4).
- Pausing can cause a strange count-up to appear (#2).
v2.2-pre2511A
Warning
This is a work-in-progress pre-release! Its additions are not yet tested. Only use this version if you’re feeling adventurous! You’ve been warned!
The latest stable release is v2.1.
Audacious Discord RPC pre2511A is a 2.2 pre-release version that adds cover fetching!
This is added as an optional opt-in in the settings, tagged as EXPERIMENTAL. The core functionality is the same, but if the option is enabled and the track is playing for longer than 2 seconds (debouncing), a worker is spawned that attempts to fetch the front cover art based on the album artist and album name.
Throughout the worker (called “cover art fetcher” or “CAF” for short), there are several checkpoints. If the user changes track while it’s working, these checkpoints can terminate the worker if the result is no longer desired.
CAF first has to fetch the release from MusicBrainz, and then use the found MBID of the release to fetch cover artwork from Cover Art Archive (a collaboration between MusicBrainz and Archive.org). If release isn’t found, no cover artworks are added or something fails, Audacious logo is shown instead (as if the option wasn’t enabled).
When a track plays, the cover art fetching algo (CAF for short) will attempt to 1. find the release on MusicBrainz based on the album name and album artist 2. fetch cover artworks based on release MBID from Cover Art Archive. If the process errors somewhere or finds nothing, the Audacious logo is shown instead.
- Debouncing of several seconds is added to account for users that mash the “NEXT” button.
- Cache of 2 MB is added to not re-fetch known artworks (if that seems small, do not that this cache links album artist+name to URL – the image is never downloaded on the client-side, as Discord RPC just needs the URL, this 2 MB seems plenty)
- The MusicBrainz query accounts for artist aliases, labels-as-album artists (compilations e.g. Monstercat) and has a mild preference for digital releases (square covers instead of vinyl scans or something)
Known Issues
- There might be unhandled parsing cases that might result in a segmentation fault. Further testing is required.
- Cache was implemented in haste and could use some work. Potentially just copy https://github.com/onegentig/VUT-FIT-IMS2024-projekt/tree/main/include/ev-policy.
- The cache currently uses FIFO eviction policy, no admission policy and no TTL/timeout. Good for prototype, not for release (should optimise for reducing number of fetches; related simulation study).
- Eviction pol.: LRU or LFU should perform much better, potentially S4LRU (likely unnecessarily complex for this use)
- Admission pol.: None required, as it reduces disk writes with fetches as trade-off.
- TTL: Uncertain if needed, cache is cleared on music player restart anyway.
- MB query should check both
artistandartistname(OR’d).
v2.1
Audacious Discord RPC version 2.1 is a patch update that fixes problems with the presence not showing up for users without a ‘display name’ (#3) and the “Hide when paused” setting being set per-session rather than properly stored (#1).
For installation guide, please read the ‘Installation’ section in the README.md. If you had the original plugin installed, please, remove that one first (different file names ⇒ won’t be replaced ⇒ you’ll have two ‘Discord RPC’ plugins) – the original was called libaudacious-plugin-rpc.so (2.0 and later is called discord-rpc.so). If you don’t know where to find it, read the second point of ‘Installation’ section in the README.md. Quick removal with a shell command:
sudo rm $(pkg-config --variable=plugin_dir audacious)/General/libaudacious-plugin-rpc.soNushell:
sudo rm $"(pkg-config --variable=plugin_dir audacious)/General/libaudacious-plugin-rpc.so"Changes
- 85f9dea Refactored code (format + improve structure + separate
.cppand.hpp) - f68739c Properly store
hide_when_paused(no longer resets tofalseafter restart; resolved issue #1) - EclipseMenu/discord-presence@59a3ba7 Fixed presence not showing for users without a “Display Name” (resolved issue #3)
- 0ffdfff Switched to own Discord application
- 7a08ad8 Add error logging to
rpc.onErrored&AUDINFOto successful callbacks - Several
README.mdclarifications and improvements
Known issues
- Timestamps are not cleared properly when paused, resulting in an unfortunate counter of how long was the user idle (#2)
Any help with fixing this issues would be much appreciated! ❤️
v2.0
Audacious Discord RPC version 2.0 is the first release of this plugin on this continuation fork, following 1.2 on the original.
For installation guide, please read the ‘Installation’ section in the README.md. If you had the original plugin installed, please, remove that one first (different file names ⇒ won’t be replaced ⇒ you’ll have two ‘Discord RPC’ plugins) – the original was called libaudacious-plugin-rpc.so (2.0 and later is called discord-rpc.so). If you don’t know where to find it, read the second point of ‘Installation’ section in the README.md. Quick removal with a shell command:
sudo rm $(pkg-config --variable=plugin_dir audacious)/General/libaudacious-plugin-rpc.soNushell:
sudo rm $"(pkg-config --variable=plugin_dir audacious)/General/libaudacious-plugin-rpc.so"Changes
- Created this fork, new README, slightly changed folder structure, plugin description in Audacious etc.
- Licensed under MIT, first adding a split licence (a3b214f), later removing any exceptions after the original repo was properly licensed (darktohka/audacious-plugin-rpc@de87d00)
- Replaced obsolete
discord/discord-rpcwithEclipseMenu/discord-presence(old Discord RPC → Discord Game SDK) - Changed style of RPC, making use of the new
LISTENINGactivity type - Added option to hide the presence when paused
- Renamed resulting binary from
libaudacious-plugin-rpc.sotodiscord-rpc.so
Known issues
- #1 – the “Hide when Paused” setting is not preserved between instances of Audacious and is reset on restart (not fixed yet).
- #2 – when the player is paused, the timestamps are sometimes not cleared properly (not fixed yet).
- darktokha#13 – Windows support is not tested and probably doesn’t work + the fact this is a Linux-first plugin is not explicit anywhere and should be added to the README (not fixed yet).
Any help with fixing this issues would be much appreciated! ❤️
