mpris mostly works, still need to init the state though

This commit is contained in:
2026-02-03 11:22:57 +01:00
parent 9c70065bf6
commit b9f5eea4af
10 changed files with 170 additions and 22 deletions

View File

@@ -33,7 +33,11 @@ SpotifyNotification::SpotifyNotification(uint64_t notificationId, std::shared_pt
title_label->set_ellipsize(Pango::EllipsizeMode::END);
auto artistLabel = Gtk::make_managed<Gtk::Label>();
artistLabel->set_text(StringHelper::trimToSize(mpris.artist[0], 30));
if (!mpris.artist.empty()) {
artistLabel->set_text(StringHelper::trimToSize(mpris.artist[0], 30));
} else {
artistLabel->set_text("Unknown Artist");
}
artistLabel->set_hexpand(true);
artistLabel->set_halign(Gtk::Align::CENTER);