add dynamic beatmap images to presence #12
9
main.js
9
main.js
|
@ -104,13 +104,12 @@ function startOsuStatus() {
|
||||||
: " ";
|
: " ";
|
||||||
if ("beatmap" in currentStatus.player_status.status) {
|
if ("beatmap" in currentStatus.player_status.status) {
|
||||||
const setId = currentStatus.player_status.status.beatmap.set_id;
|
const setId = currentStatus.player_status.status.beatmap.set_id;
|
||||||
|
const coverImage =
|
||||||
|
`https://assets.ppy.sh/beatmaps/${setId}/covers/list@2x.jpg`;
|
||||||
if (
|
if (
|
||||||
checkImageExists(
|
checkImageExists(coverImage)
|
||||||
`https://assets.ppy.sh/beatmaps/${setId}/covers/list@2x.jpg`,
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
largeImageKey =
|
largeImageKey = coverImage;
|
||||||
`https://assets.ppy.sh/beatmaps/${setId}/covers/list@2x.jpg`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user