From 2ac3df0455f8faaf472e45b4cf8de601443d0d74 Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Mon, 18 Apr 2022 18:45:53 +0300 Subject: [PATCH] add album to lastfm if available --- plugins/last-fm/back.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/last-fm/back.js b/plugins/last-fm/back.js index 567dccc0..a0533d17 100644 --- a/plugins/last-fm/back.js +++ b/plugins/last-fm/back.js @@ -89,6 +89,7 @@ const postSongDataToAPI = async (songInfo, config, data) => { track: songInfo.title, duration: songInfo.songDuration, artist: songInfo.artist, + ...(songInfo.album ? { album: songInfo.album } : undefined), // will be undefined if current song is a video api_key: config.api_key, sk: config.session_key, format: 'json', @@ -157,4 +158,4 @@ const lastfm = async (_win, config) => { }); } -module.exports = lastfm; \ No newline at end of file +module.exports = lastfm;