Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Headless daemon (`cliamp -d`) omits `mpris:artUrl` from MPRIS metadata

Open Beginner friendly
#660 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
92/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
backend, cli

Research direction

Read daemon.go at snapshotState() and compare how ui/model/notifications.go copies album art into the playback track. Add the missing AlbumArtURL mapping to the headless path, then confirm MPRIS metadata includes mpris:artUrl for a playlist track with a cover URL.

Written by the indexing model from the issue text.

Description

bug

Summary

When cliamp runs in headless daemon mode (cliamp -d), MPRIS metadata contains
title/artist/album but not mpris:artUrl, even when the loaded playlist has
a valid album_art_url.

The same playlist in TUI mode does expose mpris:artUrl, so the playlist parser
and the cover URL are fine. The omission is specific to the headless daemon.

Environment

  • cliamp: v2.3.0
  • OS: Fedora 44, Linux x86_64
  • Session: Wayland / Niri
  • MPRIS client: playerctl
  • Media shell: Noctalia (cover is visible only when MPRIS exposes mpris:artUrl)

Reproduction

Create a playlist containing a stream track with an album art URL:

[[track]]
path = "https://music.163.com/#/song?id=2699649656"
title = "Mock Cover Stream"
artist = "Test Artist"
album = "Test Album"
album_art_url = "https://p4.music.126.net/My7NFFe1Pa8SE1mSDmPlyg==/109951170919292311.jpg"
track_number = 1
duration_secs = 389

Start the headless daemon and load it:

```bash
cliamp -d
cliamp load mock-stream
playerctl -p cliamp metadata

Actual

MPRIS metadata contains:

xesam:title
xesam:url
mpris:length
xesam:artist
xesam:album
xesam:trackNumber
mpris:trackid

No mpris:artUrl.

cliamp remote state still shows the cover URL, so it is parsed correctly:

{
  "track": {
    "title": "Mock Cover Stream",
    "album_art_url": "https://p4.music.126.net/..."
  }
}

Expected

MPRIS metadata should include:

mpris:artUrl    https://p4.music.126.net/...

The same playlist loaded in TUI mode does expose it.

Root cause

In [daemon.go](https://github.com/bjarneo/cliamp/daemon.go), snapshotState() builds the playback.Track for the MPRIS
notifier but does not copy AlbumArtURL:

Track: playback.Track{
    Title:       track.Title,
    Artist:      track.Artist,
    Album:       track.Album,
    Genre:       track.Genre,
    TrackNumber: track.TrackNumber,
    URL:         track.Path,
    Duration:    d.player.Duration(),
},

The TUI path in [ui/model/notifications.go](https://github.com/bjarneo/cliamp/ui/model/notifications.go) does include it:

ArtURL: track.AlbumArtURL,

mediactl.makeMetadata() only publishes mpris:artUrl when ArtURL is
non-empty, so headless mode silently drops the cover.

Suggested fix

Add the missing field in [daemon.go](https://github.com/bjarneo/cliamp/daemon.go):

@@
            Genre:       track.Genre,
            TrackNumber: track.TrackNumber,
            URL:         track.Path,
+			ArtURL:      track.AlbumArtURL,
            Duration:    d.player.Duration(),
        },

Verification

I applied this one-line patch locally, rebuilt v2.3.0, and restarted the
headless service. playerctl -p cliamp metadata then reported:

cliamp mpris:artUrl  https://p3.music.126.net/...jpg
Dominant language
Go
Stars
4.4k
Forks
307
Avg merge
3d 6h
Merged PRs (30d)
26

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bjarneo/cliamp

All issues in bjarneo/cliamp

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.