mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Merge pull request #194 from semvis123/songprovider-update
Improved songinfo provider, by using the data from the '/player' request
This commit is contained in:
@ -24,7 +24,10 @@ module.exports = (win, {activityTimoutEnabled, activityTimoutTime}) => {
|
||||
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) {
|
||||
@ -50,8 +53,7 @@ module.exports = (win, {activityTimoutEnabled, activityTimoutTime}) => {
|
||||
});
|
||||
|
||||
// Startup the rpc client
|
||||
rpc
|
||||
.login({
|
||||
rpc.login({
|
||||
clientId,
|
||||
})
|
||||
.catch(console.error);
|
||||
|
||||
Reference in New Issue
Block a user