fix: adjust image URL size for external assets

This commit is contained in:
Seth 2025-05-19 04:48:02 -04:00
parent 9fc83cc5fc
commit 8a87799f20

View file

@ -23,7 +23,7 @@ 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:")) {