aboutsummaryrefslogtreecommitdiffstats
path: root/src/ctx.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ctx.rs')
-rw-r--r--src/ctx.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ctx.rs b/src/ctx.rs
index 0b250b1..6e0d806 100644
--- a/src/ctx.rs
+++ b/src/ctx.rs
@@ -2,8 +2,8 @@ use reqwest::StatusCode;
use super::deserialize as de;
use std::sync::Arc;
use std::collections::BTreeMap;
-use super::font::FontQuery;
-use super::config::STATE;
+use crate::cache::font::FontQuery;
+use super::config::CONFIG;
pub mod model {
use std::sync::Arc;
@@ -126,7 +126,7 @@ impl ResponseCtx {
},
scrobble: model::Scrobble {
name: track.name.clone(),
- album: track.album.name.clone(),
+ album: track.album.title.clone(),
artist: model::Artist {
name: track.artist.name.clone(),
// image_url: track.artist.images.iter().max_by(|a, b| a.size.cmp(&b.size)).map(|a| a.url.clone()).unwrap_or_else(|| "".into()),
@@ -138,8 +138,8 @@ impl ResponseCtx {
loved: track.loved.unwrap_or(false)
},
font: match font_query {
- Some(FontQuery { google_font: Some(f), .. }) if STATE.has_google_api_key() => {
- let css = match STATE.get_fontinfo(&f.to_string()).await {
+ Some(FontQuery { google_font: Some(f), .. }) if CONFIG.has_google_api_key() => {
+ let css = match crate::cache::font::get_fontinfo(&f.to_string()).await {
Ok(css) => css,
Err((status, error)) => { return ResponseCtx(model::Root::Error {error}, status); }
};