From 48c587ec6512507eeece653132fe854e1f6665c4 Mon Sep 17 00:00:00 2001 From: psykose Date: Mon, 18 Nov 2024 16:52:47 +0100 Subject: [PATCH] log cover arts --- src/subsonic.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/subsonic.rs b/src/subsonic.rs index ca5bd2c..1f3d1ef 100644 --- a/src/subsonic.rs +++ b/src/subsonic.rs @@ -120,7 +120,7 @@ impl Client { // FIXME: is an entire channel per request overkill? maybe pool them? let (sender, receiver) = async_channel::bounded(1); - event!(target: "audrey::http_request", Level::DEBUG, method = request.method().as_str(), url = request.url().as_str()); + event!(target: "audrey::http_request_send", Level::DEBUG, method = request.method().as_str(), url = request.url().as_str()); // let tokio take care of the request + further json parsing // this is because reqwest doesn't like the glib main loop @@ -198,8 +198,11 @@ impl Client { pub async fn cover_art(&self, id: &str, size: Option) -> Result { let (sender, receiver) = async_channel::bounded(1); + let url = self.cover_art_url(id, size); - let future = self.client.get(self.cover_art_url(id, size)).send(); + event!(target: "audrey::http_request_cover_art", Level::DEBUG, url = url.as_str()); + + let future = self.client.get(url).send(); runtime().spawn(async move { async fn perform( response: Result,