From 6d572ba7bd4000f8a54bd8e9354a46f59b65fb6f Mon Sep 17 00:00:00 2001 From: cryptofyre Date: Wed, 26 Oct 2022 23:37:58 -0500 Subject: [PATCH] Add image proxy to prevent Discord from having sex with my mom. --- src/main/plugins/discordrpc.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/plugins/discordrpc.ts b/src/main/plugins/discordrpc.ts index ff4860b2..268be5ea 100644 --- a/src/main/plugins/discordrpc.ts +++ b/src/main/plugins/discordrpc.ts @@ -59,6 +59,7 @@ export default class DiscordRPC { const self = this; ipcMain.on("discordrpc:updateImage", async (_event, imageurl) => { if (!this._utils.getStoreValue("general.privateEnabled")) { + console.log("[DEBUG] "+imageurl) fetch("https://api.cider.sh/v1/images", { method: "POST", headers: { @@ -68,7 +69,7 @@ export default class DiscordRPC { }) .then((res) => res.json()) .then(function (json) { - self._attributes["artwork"]["url"] = json.imageUrl; + self._attributes["artwork"]["url"] = "https://images.weserv.nl/?url="+json.imageUrl+"&w=600&h=600&output=jpg"; // Image Caching Proxy to prevent Discord from going haha no. self.setActivity(self._attributes); }); }