mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2024-11-22 13:32:42 +01:00
Add album image to media module and discord (#86)
Co-authored-by: Diogo Oliveira <diogoomarques98@gmail.com> Co-authored-by: Marie <marie@kaifa.ch>
This commit is contained in:
parent
c940d0991d
commit
0dec967e71
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 }],
|
||||
},
|
||||
});
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user