From f981b646875157f8e183bed8903dc9e5a14ac259 Mon Sep 17 00:00:00 2001 From: Ronak Buch Date: Mon, 18 Apr 2022 11:10:56 -0400 Subject: [PATCH] Only download cover image when flag enabled (#780) * Only download cover image when flag enabled * fixup! Only download cover image when flag enabled --- src/queue.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/queue.rs b/src/queue.rs index f2d2fa5..4fe08e4 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -274,7 +274,11 @@ impl Queue { let notification_id = self.notification_id.clone(); std::thread::spawn({ let track_name = track.to_string(); - let cover_url = track.cover_url(); + let cover_url = if cfg!(feature = "cover") { + track.cover_url() + } else { + None + }; move || send_notification(&track_name, cover_url, notification_id) }); }