mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
Improved songinfo provider, by using the data from the '/player' request
This commit is contained in:
@ -22,7 +22,10 @@ module.exports = (win) => {
|
||||
details: songInfo.title,
|
||||
state: songInfo.artist,
|
||||
largeImageKey: "logo",
|
||||
largeImageText: songInfo.views + " - " + songInfo.likes,
|
||||
largeImageText: [
|
||||
songInfo.uploadDate,
|
||||
songInfo.views.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " views"
|
||||
].join(' || '),
|
||||
};
|
||||
|
||||
if (songInfo.isPaused) {
|
||||
@ -42,8 +45,7 @@ module.exports = (win) => {
|
||||
});
|
||||
|
||||
// Startup the rpc client
|
||||
rpc
|
||||
.login({
|
||||
rpc.login({
|
||||
clientId,
|
||||
})
|
||||
.catch(console.error);
|
||||
|
||||
Reference in New Issue
Block a user