Skip to content

feat: add album art URL variable - #9

Merged
PyFlat-JR merged 1 commit into
mainfrom
feature/album-art-url
Nov 13, 2026
Merged

PyFlat-JR merged 1 commit into
mainfrom
feature/album-art-url

Conversation

@PyFlat-JR

Copy link
Copy Markdown
Member

What does this PR do?

Adds system_media_album_art_url, the address of the current cover, so a widget built with the Custom Button plugin can show the album art like the Music Player widget does. Asked for on Discord by the Custom Button author, as WebNowPlaying already offers one.

  • Value: the host's own artwork endpoint, not the source, e.g. /api/music-player/artwork/art-8afec4c090bbd648?instanceId=com.pyflat.system-media%3A%3Acurrent. The host fetches the image through GetArtworkAsync, which already serves the widget, so local files and thumbnails without a URL work too. Built the same way as the host's WebNowPlaying and Spotify integrations.
  • Instance id: the host registers the plugin under its manifest id and resolves the player as <plugin id>::<instance id>. The plugin id comes from PluginMetadata at runtime, so it stays in manifest.json only.
  • No cover: the URL falls back to the app icon, like the widget. Without a cover and without an icon the value is empty.
  • Per app: every app in the catalog gets its own copy, e.g. system_media_spotify_album_art_url, shown as "Spotify: Album art URL".
  • Access: the endpoint needs client access. Custom Button recognizes the path and loads the image through the SDK's UI resources, so it needs no login.
  • Tests:
    • the qualified player id;
    • the URL, with an @ app variant escaped;
    • no URL without artwork;
    • the per-app variable mapping back to the Any app one.
  • Docs: README (Variables).

Checklist

  • I have read AGENTS.md.
  • make build and make test pass locally (0 warnings, 261 tests; 278 with -p:SystemMediaWindows=false).
  • make conformance passes (32 passed, 0 failed; MDC0802 is inconclusive, as on main).
  • I updated README.md / AGENTS.md if this changes what they describe.

Tested on

Macro Deck 3 host, Windows 11, with Custom Button 0.48.6:

  • a button bound to system_media_album_art_url, system_media_track_name and system_media_artist shows the cover, title and artist;
  • the cover follows a track change.

@PyFlat-JR
PyFlat-JR merged commit c7322be into main Nov 13, 2026
3 checks passed
@PyFlat-JR
PyFlat-JR deleted the feature/album-art-url branch November 13, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant