Compare commits

...

2 commits

Author SHA1 Message Date
334e6958ba lint
All checks were successful
Code quality checks / biome (push) Successful in 11s
2025-05-19 04:48:17 -04:00
8a87799f20 fix: adjust image URL size for external assets 2025-05-19 04:48:02 -04:00
2 changed files with 11 additions and 8 deletions

View file

@ -23,7 +23,10 @@ const getImageUrl = (activity: LanyardActivity, size: "large" | "small") => {
if (!image) return null;
if (image.startsWith("mp:external")) {
return `https://wsrv.nl/?w=${size === "large" ? 120 : 40}&url=https://${image.split("/").slice(3).join("/")}`;
return `https://wsrv.nl/?w=${size === "large" ? 120 : 40}&url=https://${image.split("/").slice(3).join("/")}`.replace(
"1280x1280",
"160x160",
); // last bit assumes tidal.
}
if (image.startsWith("mp:")) {