add album to lastfm if available

This commit is contained in:
Araxeus
2022-04-18 18:45:53 +03:00
parent 23058729f3
commit 2ac3df0455

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;