A simple Discord Rich Presence application and LastFM scrobbler for Apple Music. Currently only supporting Windows with plans to support Linux.
Simply download and extract the latest release to a folder of your choosing. Ample runs in the background so no windows will appear when executed. It's highly recommended to set up some way to autostart the application when the computer boots. For Windows, look into "Startup Apps" in the settings, the autostart folder, or the Windows "Task Scheduler."
Ample supports scrobbling of songs played on Apple Music. While Ample can provide most features without LastFM support, the public API used for album cover images (Cover Art Archive) is subject to more rate limiting while LastFM is more lenient. It may be the case using LastFM's api results in better performance though it should usually be negligible.
In order for LastFM support to be enabled, you need to provide your LastFM username, password, API Key, and API secret. Click here for more info about registering an API key and secret and here to access already created API keys and secrets.
There are two ways of providing this info to Ample. The first is by setting the following environment variables:
- AMPLE_FM_USERNAME
- AMPLE_FM_PASSWORD
- AMPLE_FM_API_KEY
- AMPLE_FM_SECRET
These can also be provided in an .env file, however this file needs to be in the same folder as the executable.
If you feel uncomfortable keeping this info in a plain text file, the second way uses your platforms credential / secret manager. For Windows, this is the Credential Manager. For other platforms, refer to keyring's supported options under the header Platforms.
Ample will look for the secret in an entry called ampleSecret and the password in an entry called amplePassword. However, the username and api_key still need to be given using environment variables.
Logs will be stored on Windows in AppData\Roaming\ample\config\logs, and on Linux at ~/.config/ample/config/logs.
Setting the environment variable "AMPLE_DEBUG" will print debug logging info but will require resetting the program.
The config file is located at AppData\Roaming\ample\config\ample_config.json on Windows, and ~/.config/ample/config/ample_config.json on Linux.
wait_for_discord(bool): If true, Ample will pause execution until Discord can be connected to. If false, Ample will attempt to scrobble without Discord. If that fails, then the program will idle. Default value:falsevalid_media_sources(list): A list of executable names that Ample will listen to and send to Discord and LastFM. Default value:["AppleMusic.exe"]
You will need Rust installed. After that, clone the repo onto your computer.
To build the release version of the project, run:
cargo build --package ample --release --features headless
If you want a console window to appear, you can omit the "headless" feature and run
cargo build --package ample --release