This is a helper application that uploads images to Catbox, and is meant to be invoked by the foo_discord_rich plugin.
Use rustup to download an appropriate toolchain for Windows. Don't forget to install git if you're cloning this repository.
- Clone the repository with git:
git clone https://github.com/realoksi/foobar2000-catbox.gitcdinto the cloned directory:
cd foobar2000-catbox- Compile the application:
cargo build -rNote
-r compiles the application as a release build, which excludes unecessary debug information and performs important optimizations
So long as there are no errors while compiling, you'll end up with a build available at target/release/foobar2000-catbox.exe.
You can download the latest release build of foobar2000-catbox.exe from the repository releases if you aren't compiling. Otherwise, use the compiled executable from the previous section. We're also assuming you have foo_discord_rich already installed.
- Move executable somewhere permanent
mv foobar2000-catbox.exe C:\Note
Although the previous command moves it to the root of the C drive, you can put it anywhere as long as the path specified later in foobar2000 is accurate
-
Open foobar2000
-
Open the
Preferencesmenu from theFiledropdown in the toolbar
Tip
You can also use the Ctrl+P shortcut
-
On the left-side list under
ToolsclickDiscord Rich Presence Integration -
Navigate to the
Advancedtab -
Check the box labeled:
Upload and display art (disables MusicBrainz fetcher) -
Specify the executable path in the
Upload commandtextbox.
Tip
For example, if the executable is at the root of our C drive like demonstrated earlier, we'd use "C:\foobar2000-catbox.exe" as the Upload command value (quotes included)
After installation, cover art will be uploaded automatically for each song/album that's played. No further configuration from this point on is necessary to have a working instance.
As with the previous version of this uploader, you can fine-tune its behavior further, now through the use of a YAML file that accompanies the executable.
| Feature | Description |
|---|---|
| Encoding format and quality | Adjust encoding format and quality to get your desired speed/image fidelity. Currently, you can upload cover art as a JPG, PNG, or WEBP - as these are the formats supported by Discord. You may only currently control the quality level of JPGs. |
| Downscaling | Automatically downscale images that exceed a specified threshold. |
Warning
The WEBP encoder used at this time is lossless only. Using this will increase the file size of the uploaded image - slowing down both the upload and download speed of your cover art.
You can get started by copying the full sample settings.yml included in this repository to the same directory as your configured foobar2000-catbox.exe application. Descriptions are available in the sample file, along with acceptable values.
...
Here's a small flowchart; A non-precise visualization outlining the flow of the application.
flowchart TD
A[Load and validate settings]
-->B[Read input from stdin]
-->C[Load image into memory]
-->D[Should resize image?]
-->E[Should encode image?]
-->F[Use Catbox consumer]
-->G[Upload image]
-->H[Output response to stdout]
- Litterbox is now disabled by default, but remains available.
- Add resize filter-type setting option
- Also use environment variables as configuration options
- Write a mermaid chart outlining the process flow
- Create basic compiling, installation, and usage instructions
- More comprehensive testing
- Github actions for version releases
- Reduce release version file size and compile time
- Write a troubleshooting section
- Aggressive encoding/downscaling to reach specific file size
- Automatic encoding from non-supported format to supported format (supported by Discord)