Merge pull request #1770 from Scrumplex/fix-mpd-double-encode

This commit is contained in:
Alex 2022-11-06 09:52:31 +01:00 committed by GitHub
commit af1668dfd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 10 deletions

View File

@ -170,16 +170,14 @@ void waybar::modules::MPD::setLabel() {
try { try {
label_->set_markup(fmt::format( label_->set_markup(fmt::format(
format, fmt::arg("artist", Glib::Markup::escape_text(artist).raw()), format, fmt::arg("artist", artist.raw()), fmt::arg("albumArtist", album_artist.raw()),
fmt::arg("albumArtist", Glib::Markup::escape_text(album_artist).raw()), fmt::arg("album", album.raw()), fmt::arg("title", title.raw()), fmt::arg("date", date),
fmt::arg("album", Glib::Markup::escape_text(album).raw()), fmt::arg("volume", volume), fmt::arg("elapsedTime", elapsedTime),
fmt::arg("title", Glib::Markup::escape_text(title).raw()), fmt::arg("totalTime", totalTime), fmt::arg("songPosition", song_pos),
fmt::arg("date", Glib::Markup::escape_text(date).raw()), fmt::arg("volume", volume), fmt::arg("queueLength", queue_length), fmt::arg("stateIcon", stateIcon),
fmt::arg("elapsedTime", elapsedTime), fmt::arg("totalTime", totalTime), fmt::arg("consumeIcon", consumeIcon), fmt::arg("randomIcon", randomIcon),
fmt::arg("songPosition", song_pos), fmt::arg("queueLength", queue_length), fmt::arg("repeatIcon", repeatIcon), fmt::arg("singleIcon", singleIcon),
fmt::arg("stateIcon", stateIcon), fmt::arg("consumeIcon", consumeIcon), fmt::arg("filename", filename)));
fmt::arg("randomIcon", randomIcon), fmt::arg("repeatIcon", repeatIcon),
fmt::arg("singleIcon", singleIcon), fmt::arg("filename", filename)));
} catch (fmt::format_error const& e) { } catch (fmt::format_error const& e) {
spdlog::warn("mpd: format error: {}", e.what()); spdlog::warn("mpd: format error: {}", e.what());
} }