Custom Activity Name Templates #23
Reference in New Issue
Block a user
Delete Branch "atridadl/main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #22
This would implement custom activity names using a simple template format in the plugin settings.
{track}, {artist}, {album} are the placeholders in the custom text that will sub in the actual track info.
Screenshot of the settings with this built out:

I built this for 0.3.0 (since 1.0.0 does not run on my navidrome instance, but made the same set of changes off of main. tests are implemented and pass.
Summary of Changes
Hello, I'm Gemini Code Assist1 ! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request significantly enhances the Discord Rich Presence integration by allowing users to define custom activity names using a templating system. This provides greater flexibility and personalization for how music playback information is displayed on Discord, moving beyond the previously fixed options. The changes include new configuration options, core logic for template processing, and corresponding UI updates.
Highlights
{track},{artist}, and{album}placeholders within custom templates, which are dynamically replaced with actual track information.🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.
Changelog
.DS_Storeto the ignore list.activityNameTemplateKeyfor configuration.activityNameCustomconstant to represent the new custom option.NowPlayingto retrieve and process custom templates, replacing placeholders with actual track, artist, and album information.activitynameenum with a 'Custom' option.activitynametemplateconfiguration property, including its title, description, and a default value.activitynametemplateinput field whenactivitynameis set to 'Custom'.Activity
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either
/gemini <command>or@gemini-code-assist <command>. Below is a summary of the supported commands on the current page./gemini review/gemini summary/gemini helpCustomization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a
.gemini/folder in the base of the repository. Detailed instructions can be found here.Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩︎
Code Review
This pull request introduces a new feature allowing users to define custom templates for Discord activity names. The implementation is solid, with changes correctly applied to the plugin logic, configuration manifest, and with comprehensive tests added to validate the new functionality. My review includes one suggestion to improve the performance and readability of the string replacement logic.
The current implementation uses multiple
strings.ReplaceAllcalls to substitute placeholders in the template. This can be inefficient as it creates a new string for each replacement. For better performance and cleaner code, you can usestrings.NewReplacer. It builds a more efficient replacer and performs all substitutions in a single pass. This is a common Go idiom for multiple replacements.Download the plugin for this PR: discord-rich-presence.zip
Built from
414021f471on 2026-03-10T12:18:56ZSure thing clanker
Hopefully this is a bit better! Was just messing around with the options in the plugin and thought this could be useful.
Resolved merge conflicts as best I could.
Resolved even more conflicts :)
Even more conflict resolution. Let me know if theres anything else needed for this PR @deluan