A Discord Rich Presence client for Apple Music's native Windows app.
Last.FM scrobbling is also supported!
Releases can be found here.
Note: AMWin-RP will run on Windows 10 21H1 or later, but the Apple Music app requires at least Windows 10 22H2.
There are two release files: the standard one and one marked as NoRuntime
.
If in doubt, use the unlabelled release (i.e. the one without NoRuntime
).
This version works universally, but is larger in size because it bundles the components of .NET that are needed for the app to run.
The NoRuntime
release is much smaller, but requires you to have the .NET 8.0 runtime installed.
If you don't have this runtime installed, the program will prompt you to do it when it opens.
You need the Microsoft store version of Apple Music to use AMWin-RP.
There is no support for iTunes, Apple Music via WSA or any other third-party players.
Before creating a new issue, please make sure your problem does not fall under an existing issue.
If you are reporting a problem, please attach any relevant .log
files (found in C:\Users\your_username_here\AppData\Local\AMWin-RichPresence
).
Before posting, please double-check the following:
You will need your own API Key and API Secret from Last.FM.
To generate one, go to https://www.last.fm/api and select "Get an API Account."
Enter these in the settings menu with your Last.FM username and password.
The Last.FM password is stored in Windows Credentials Manager under your local Windows account.
This Scrobbler implementation does not support offline Scrobbles, which means any songs you listen to while not connected to the Internet will be lost.
You can scrobble to ListenBrainz by adding your user token in the settings.
⚠️ Technical details ahead ⚠️
The biggest challenge here is being able to extract song information out of the Apple Music app.
This is achieved using Microsoft's UI Automation API via the FlaUI library, which lets us access UI elements of any window on the user's desktop.
The general process is this:
The other problem is getting the song's cover art.
(It's not well documented, but Discord RPC now lets you specify arbitrary images by sending the image URL in place of the assets key.)
We can't use UI Automation to get the image being displayed in the window (as far as I know). Instead we send an HTTP request to the Last.FM or Apple Music website, where we try to search for the song and grab the cover image URL from there.
It's not ideal but gives us what we're looking for most of the time.