Add uguu.se artwork upload for private Navidrome instances #4
Reference in New Issue
Block a user
Delete Branch "coverart-fallback"
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?
NOTE: This version only works with the Navidrome version 0.60.2 and above.
Summary
SubsonicAPICallRawand uploaded to uguu.se, with cached URLs to avoid redundant uploads (2.5h cache TTL vs 3h provider expiry)Closes #1
Test plan
go test -race ./...passesDownload the plugin for this PR: discord-rich-presence.zip
Built from
9a040c33dfon 2026-02-07T19:22:52ZPull request overview
This pull request adds optional image hosting integration to enable Discord to display album artwork when Navidrome instances are not publicly accessible (e.g., behind Tailscale or VPN). The implementation supports two image hosting providers (imgbb and uguu.se) with caching to avoid redundant uploads.
Changes:
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@@ -0,0 +1,110 @@package mainThe API key is directly interpolated into a URL-encoded form body without proper escaping. If the API key contains special characters like '&' or '=', this could break the request format. Consider using url.Values or proper URL encoding to safely construct the form body.
When an empty string is provided for imagehost (e.g., user clears the field), the switch statement will fall through to the default case and use getImageDirect. This is acceptable behavior, but it might be clearer to explicitly handle the empty string case for better code readability and maintainability.
@@ -0,0 +55,4 @@}// Fetch artwork data from NavidromecontentType, data, err := host.SubsonicAPICallRaw(fmt.Sprintf("/getCoverArt?u=%s&id=%s&size=300", username, trackID))The username and trackID parameters are directly interpolated into the URL without proper escaping. If a username contains special characters like '&' or '=', this could break the query string or potentially be exploited for parameter injection. Consider using url.QueryEscape or a proper URL builder to safely construct the query parameters.
@@ -39,6 +42,11 @@"maxLength": 20,The imagehost field uses an enum with only two values ("imgbb", "uguu"), but does not include an empty string option. This means users cannot explicitly unset this field once it's been set. Consider either making this field optional (not in the enum) or adding an empty string/null option to allow users to disable image hosting after enabling it.