Merge pull request #695 from Araxeus/add-album-to-lastfm

add album to lastfm if available
This commit is contained in:
th-ch
2022-05-01 21:33:16 +02:00
committed by GitHub

View File

@ -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;
module.exports = lastfm;