patch: update ordering/case of activityname options, update README

This commit is contained in:
Daniel Stefani
2026-02-08 18:41:03 +01:00
parent 629ce68a8c
commit 2be99c413a
4 changed files with 24 additions and 13 deletions
+11
View File
@@ -14,6 +14,7 @@ Based on the [Navicord](https://github.com/logixism/navicord) project.
## Features
- Shows currently playing track with title, artist, and album art
- Customizable activity name: "Navidrome" is default, but can be configured to display track title, artist, or album
- Displays playback progress with start/end timestamps
- Automatic presence clearing when track finishes
- Multi-user support with individual Discord tokens
@@ -163,6 +164,16 @@ Access the plugin configuration in Navidrome: **Settings > Plugins > Discord Ric
3. Copy the "Application ID" from the General Information page
- **Example**: `1234567890123456789`
#### Activity Name Display
- **What it is**: Choose what information to display as the activity name in Discord Rich Presence
- **Options**:
- **Default**: Shows "Navidrome" (static app name)
- **Track**: Shows the currently playing track title
- **Album**: Shows the currently playing track's album name
- **Artist**: Shows the currently playing track's artist name
- **Default**: "Default"
- **Use case**: Choose "Track" or "Artist" for more dynamic, music-focused presence that changes with each song
#### Upload to uguu.se
- **When to enable**: Your Navidrome instance is NOT publicly accessible from the internet
- **What it does**: Automatically uploads album artwork to uguu.se (temporary hosting) so Discord can display it
+7 -7
View File
@@ -32,10 +32,10 @@ const (
// Activity name display options
const (
activityNameDefault = "default"
activityNameTitle = "title"
activityNameArtist = "artist"
activityNameAlbum = "album"
activityNameDefault = "Default"
activityNameTrack = "Track"
activityNameArtist = "Artist"
activityNameAlbum = "Album"
)
// userToken represents a user-token mapping from the config
@@ -149,12 +149,12 @@ func (p *discordPlugin) NowPlaying(input scrobbler.NowPlayingRequest) error {
activityName := "Navidrome"
activityNameOption, _ := pdk.GetConfig(activityNameKey)
switch activityNameOption {
case activityNameTitle:
case activityNameTrack:
activityName = input.Track.Title
case activityNameArtist:
activityName = input.Track.Artist
case activityNameAlbum:
activityName = input.Track.Album
case activityNameArtist:
activityName = input.Track.Artist
}
// Send activity update
+4 -4
View File
@@ -225,10 +225,10 @@ var _ = Describe("discordPlugin", func() {
Expect(sentPayload).To(ContainSubstring(fmt.Sprintf(`"name":"%s"`, expectedName)))
},
Entry("defaults to Navidrome when not configured", "", false, "Navidrome"),
Entry("defaults to Navidrome with explicit default value", "default", true, "Navidrome"),
Entry("uses track title when configured", "title", true, "Test Song"),
Entry("uses track artist when configured", "artist", true, "Test Artist"),
Entry("uses track album when configured", "album", true, "Test Album"),
Entry("defaults to Navidrome with explicit default value", "Default", true, "Navidrome"),
Entry("uses track title when configured", "Track", true, "Test Song"),
Entry("uses track album when configured", "Album", true, "Test Album"),
Entry("uses track artist when configured", "Artist", true, "Test Artist"),
)
})
+2 -2
View File
@@ -51,8 +51,8 @@
"type": "string",
"title": "Activity Name Display",
"description": "Choose what to display as the activity name in Discord Rich Presence",
"enum": ["default", "title", "artist", "album"],
"default": "default"
"enum": ["Default", "Track", "Album", "Artist"],
"default": "Default"
},
"uguuenabled": {
"type": "boolean",