mpris mostly works, still need to init the state though
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user