From 557e073a9caf0dfa2c393a796bc4f23b25118c7c Mon Sep 17 00:00:00 2001 From: amsyarasyiq <82711525+amsyarasyiq@users.noreply.github.com> Date: Thu, 16 Feb 2023 21:58:36 +0800 Subject: [PATCH] Last.fm: pass track for app's name --- plugins/Last.fm/src/utils.ts | 6 ++++++ plugins/MoreConfirm/manifest.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/Last.fm/src/utils.ts b/plugins/Last.fm/src/utils.ts index a134edd..196a4e4 100644 --- a/plugins/Last.fm/src/utils.ts +++ b/plugins/Last.fm/src/utils.ts @@ -128,6 +128,12 @@ async function update() { global.lastTrackUrl = lastTrack.url; + if (activity.name.includes("{{")) { + for (const key in lastTrack) { + activity.name = activity.name.replace(`{{${key}}}`, lastTrack[key]); + } + } + // Set timestamps if (currentSettings.showTimestamp) { activity.timestamps = { diff --git a/plugins/MoreConfirm/manifest.json b/plugins/MoreConfirm/manifest.json index 81700e7..d455ba1 100644 --- a/plugins/MoreConfirm/manifest.json +++ b/plugins/MoreConfirm/manifest.json @@ -9,6 +9,6 @@ ], "main": "src/index.ts", "vendetta": { - "icon": "ic_checked" + "icon": "check" } }