From bcc6ab50e2a4561a73b884d7e7a05b0c686aa8de Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Thu, 4 Oct 2018 04:05:05 +0300 Subject: [PATCH] PlayerInfo: Minor refactor of the mpris cover --- podcasts-gtk/src/widgets/player.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/podcasts-gtk/src/widgets/player.rs b/podcasts-gtk/src/widgets/player.rs index 3173102..e2d994f 100644 --- a/podcasts-gtk/src/widgets/player.rs +++ b/podcasts-gtk/src/widgets/player.rs @@ -63,10 +63,10 @@ impl PlayerInfo { let mut metadata = Metadata::new(); metadata.artist = Some(vec![podcast.title().to_string()]); metadata.title = Some(episode.title().to_string()); + // FIXME: .image_uri() returns an http url, we should instead + // pass it the local path to the downloaded cover image. + metadata.art_url = podcast.image_uri().clone().map(From::from); - podcast.image_uri().map(|value| { - metadata.art_url = Some(value.to_string()); - }); self.mpris.set_metadata(metadata); self.mpris.set_can_play(true); }