diff --git a/app/src/integrations.js b/app/src/integrations.js index 0495ac6..ce77920 100644 --- a/app/src/integrations.js +++ b/app/src/integrations.js @@ -54,11 +54,12 @@ class Integrations extends EventEmitter { } //LastFM Scrobble - async scrobbleLastFM(title, artist) { + async scrobbleLastFM(title, artist, album) { if (this.settings.lastFM) this.lastfm.track.scrobble({ artist: artist, track: title, + album: album, timestamp: Math.floor((new Date()).getTime() / 1000) }); } @@ -137,4 +138,4 @@ class Integrations extends EventEmitter { } -module.exports = {Integrations}; \ No newline at end of file +module.exports = {Integrations}; diff --git a/app/src/server.js b/app/src/server.js index 071e877..9f1b2c6 100644 --- a/app/src/server.js +++ b/app/src/server.js @@ -463,7 +463,7 @@ app.delete('/downloads/:index', async (req, res) => { //Log listen to deezer & lastfm app.post('/log', async (req, res) => { //LastFM - integrations.scrobbleLastFM(req.body.title, req.body.artists[0].name); + integrations.scrobbleLastFM(req.body.title, req.body.artists[0].name, req.body.album.title); //Deezer if (settings.logListen) @@ -723,4 +723,4 @@ async function createServer(electron = false, ecb, override = {}) { return settings; } -module.exports = {createServer}; \ No newline at end of file +module.exports = {createServer};