From c22b8194c5f660f1447d300bbf1b4917df882fde Mon Sep 17 00:00:00 2001 From: Lina <61861965+l1na-forever@users.noreply.github.com> Date: Wed, 23 Nov 2022 15:02:50 -0800 Subject: [PATCH] always emit the album art URL representing the largest image to DBus (#1132) * always emit the album art URL representing the largest image to DBus Co-authored-by: eladyn <59307989+eladyn@users.noreply.github.com> --- src/dbus_mpris.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbus_mpris.rs b/src/dbus_mpris.rs index c4d3e0a0..0fa9677a 100644 --- a/src/dbus_mpris.rs +++ b/src/dbus_mpris.rs @@ -776,7 +776,7 @@ fn insert_metadata(m: &mut HashMap>>, item: Play Variant(Box::new( item.images .into_iter() - .next() + .max_by_key(|i| i.width.unwrap_or(0)) .map(|i| i.url) .unwrap_or_default(), )),