From d601f4bfabb0ddacf9b84025414e0088dd22e65a Mon Sep 17 00:00:00 2001 From: dbroqua Date: Fri, 8 May 2020 13:30:03 +0200 Subject: [PATCH] Fixed bug on get medias --- app.js | 1 + libs/Format.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 096e822..3c11763 100644 --- a/app.js +++ b/app.js @@ -39,6 +39,7 @@ fs.readFile("./currentSongId", "utf8", (err, data) => { app.post("/post", function (req, res, next) { if (req.body && req.body.now_playing && req.body.now_playing.song) { + console.log("Received:", req.body.now_playing); const newSongId = req.body.now_playing.song.id; if (newSongId !== currentSongId) { currentSongId = newSongId; diff --git a/libs/Format.js b/libs/Format.js index 4a007fb..38d5954 100644 --- a/libs/Format.js +++ b/libs/Format.js @@ -65,7 +65,7 @@ const _getMedia = (coverUrl, callback) => { try { request({ - uri: coverUrl, + uri: coverUrl.replace("localhost", "azura.shoutca.st"), headers: { "Cache-Control": "max-age=0", Connection: "keep-alive",