Fixed bug on get medias

This commit is contained in:
dbroqua 2020-05-08 13:30:03 +02:00
parent 90d297c3b3
commit d601f4bfab
2 changed files with 2 additions and 1 deletions

1
app.js
View file

@ -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;

View file

@ -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",