We all have friends who have Spotify (gross), but it shows what they are listening to in Discord! Being an apple music user, I felt left out so implemented it myself!
If you like the project and use it a lot, I would love the support. I don't monetize this project other than donations, and it does cost a couple dollars a month, so I would be extremely appreciative of whatever you are willing or able to contribute.
I created apple-music-presence, which on a once-per-second event loop, asks Apple Music for information on the currently-played track, and to tell Discord the song name, artist, album, and the album cover (which was problematic).
I knew I really wanted to display the image of the Album Cover, but that turned into quite a struggle because Discord doesn't allow you to submit the image data directly, it only accepts URLs. I tried submitting a base64-encoded url, but Discord only allows urls under 255 characters long, which was a problem because base64-encoded urls are very long. My irresponsible solution is to set up an s3 bucket on DigitalOcean, and to upload the images from Apple Music, generate a URL, then submit that image to Discord. It is a strange solution, but it works pretty well!
Unfortunately, I cannot change the card header from 'Playing a game' because that part is put in place by Discord. Other than that, I am very happy with how it works!
Features
Easy startup
Extremely lightweight
No API keys required
No dependencies
Easy setup
Display song name
Display album art
Display artist name
Display album name (which has turned out to be unique amongst other services)
Installation
Download the latest release from the releases page on GitHub. There are 3 options. You want to select apple-music-presence.zip
with the little cube icon, NOT either of the source code folders. This will download a zip file with the latest release.
Unzip the folder.
To run the program, simply right-click on apple-music-presence
inside the unzipped folder and select 'Open'. MacOS will warn you that this is from an unidentified developer, and if you trust me, just click on 'Open'. If you don't trust me and know your way around code, you can build it yourself.
If you want to, you can add this program to your Mac's startup file.
Support
Contact me on Discord at improper-adjectives#0597
and I will get back to you. My phone number is available in the supporter-only post here on Buy me a Coffee, so if you urgently need support, become a supporter!
If you like the project and use it a lot, I would love the support. I don't monetize this project other than donations, and it does cost a couple dollars a month, so I would be extremely appreciative of whatever you are willing or able to contribute.