log cover arts
This commit is contained in:
parent
d722e4d105
commit
48c587ec65
1 changed files with 5 additions and 2 deletions
|
@ -120,7 +120,7 @@ impl Client {
|
||||||
// FIXME: is an entire channel per request overkill? maybe pool them?
|
// FIXME: is an entire channel per request overkill? maybe pool them?
|
||||||
let (sender, receiver) = async_channel::bounded(1);
|
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
|
// let tokio take care of the request + further json parsing
|
||||||
// this is because reqwest doesn't like the glib main loop
|
// 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<u32>) -> Result<Bytes, Error> {
|
pub async fn cover_art(&self, id: &str, size: Option<u32>) -> Result<Bytes, Error> {
|
||||||
let (sender, receiver) = async_channel::bounded(1);
|
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 {
|
runtime().spawn(async move {
|
||||||
async fn perform(
|
async fn perform(
|
||||||
response: Result<reqwest::Response, reqwest::Error>,
|
response: Result<reqwest::Response, reqwest::Error>,
|
||||||
|
|
Loading…
Reference in a new issue