Unhardcode mii image URL

This commit is contained in:
red binder 2026-04-12 15:04:26 +02:00
commit a281b56cc8

View file

@ -75,7 +75,7 @@ pub async fn get_miis(
.replace(['\r', '\n', '\t', ' '], ""); .replace(['\r', '\n', '\t', ' '], "");
let mii_id = gxhash32(clean_mii_data.as_bytes(), 0); let mii_id = gxhash32(clean_mii_data.as_bytes(), 0);
let expression_types = [ let expression_types = [
("normal_face.png", "standard"), ("normal_face.png", "standard"),
("frustrated.png", "frustrated_face"), ("frustrated.png", "frustrated_face"),
@ -92,7 +92,7 @@ pub async fn get_miis(
.iter() .iter()
.map(|(file, img_type)| { .map(|(file, img_type)| {
// dummy URL for now // dummy URL for now
let url = format!("https://dummy.url.com/mii/{}/{}", row.pid, file); let url = format!("{}/mii/{}/{}", get_mii_img_url(row.pid, "png"), row.pid, file);
MiiImage { MiiImage {
cached_url: url.clone(), cached_url: url.clone(),
id: mii_id, id: mii_id,