Rust program that runs in the background and updates your Discord activity if you're playing music with Apple Music.
On desktop, Discord might display the activity like this instead:
Unfortunately, there's nothing I can do about that, but at least it doesn't look bad still.
Right now, the easiest way to install if you have the Rust toolchain installed is with Cargo:
cargo install --git https://github.com/valentinegb/apple-music-rich-presence.git --tag v1.1.0
The program has only been tested on macOS, and it probably only works on macOS.
Just run the program (if installed through Cargo, enter
apple-music-rich-presence
into your terminal) and you're good to go! I would
recommend adding it to your Login Items in System Settings so that you don't
have to start it manually every time you restart your computer.
There are a few environment variables that can be used to configure Apple Music Rich Presence.
Apple Music Rich Presence, by default, will ensure that each iteration (where it
checks whether Discord and Apple Music are open, whether the currently playing
song has changed, etc.) spans at least 1 second. If you feel that it need more
time to prevent glitchy behaviour like Apple Music refusing to quit, you can
raise this to, say, MIN_ITER_DUR=3
.
By default, Apple Music Rich Presence will launch a daemon process to run in the
background. You can disable this behaviour, however, by setting DAEMON
to 0
.
Then, the program will stay present and you'll be able to see its logging in
your terminal.
This variable configures the level of logging to perform. See
env_logger
's documentation
for info.