diff --git a/src/preload.js b/src/preload.js index ee70a05..0087255 100644 --- a/src/preload.js +++ b/src/preload.js @@ -57,7 +57,7 @@ const elements = { if (figure) { const mediaElement = figure.querySelector(this["image"]); if (mediaElement) { - return mediaElement.src; + return mediaElement.src.replace("80x80", "640x640"); } } diff --git a/src/scripts/discord.js b/src/scripts/discord.js index 668a010..7560c09 100644 --- a/src/scripts/discord.js +++ b/src/scripts/discord.js @@ -31,6 +31,7 @@ const observer = (event, arg) => { : "unknown artist(s)", startTimestamp: parseInt(now), endTimestamp: parseInt(remaining), + largeImageKey: mediaInfoModule.mediaInfo.image, buttons: [{ label: "Play on Tidal", url: mediaInfoModule.mediaInfo.url }], }, }); diff --git a/src/scripts/mediaInfo.js b/src/scripts/mediaInfo.js index 0964aa5..ecc37ee 100644 --- a/src/scripts/mediaInfo.js +++ b/src/scripts/mediaInfo.js @@ -7,7 +7,8 @@ const mediaInfo = { status: statuses.paused, url: "", current: "", - duration: "" + duration: "", + image: "tidal-hifi-icon" }; const mediaInfoModule = { mediaInfo, @@ -24,6 +25,7 @@ mediaInfoModule.update = function (arg) { mediaInfo.status = propOrDefault(arg.status); mediaInfo.current = propOrDefault(arg.current); mediaInfo.duration = propOrDefault(arg.duration); + mediaInfo.image = propOrDefault(arg.image); }; /**