mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
fix(tuna-obs): Added song url to tuna-obs plugin (#2524)
This commit is contained in:
@ -16,6 +16,7 @@ interface Data {
|
|||||||
progress: number;
|
progress: number;
|
||||||
status: string;
|
status: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
url: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default createPlugin({
|
export default createPlugin({
|
||||||
@ -37,6 +38,7 @@ export default createPlugin({
|
|||||||
duration: 0,
|
duration: 0,
|
||||||
album_url: '',
|
album_url: '',
|
||||||
album: undefined,
|
album: undefined,
|
||||||
|
url: '',
|
||||||
} as Data,
|
} as Data,
|
||||||
start({ ipc }) {
|
start({ ipc }) {
|
||||||
const secToMilisec = (t: number) => Math.round(Number(t) * 1e3);
|
const secToMilisec = (t: number) => Math.round(Number(t) * 1e3);
|
||||||
@ -106,6 +108,7 @@ export default createPlugin({
|
|||||||
this.data.artists = [songInfo.artist];
|
this.data.artists = [songInfo.artist];
|
||||||
this.data.status = songInfo.isPaused ? 'stopped' : 'playing';
|
this.data.status = songInfo.isPaused ? 'stopped' : 'playing';
|
||||||
this.data.album = songInfo.album;
|
this.data.album = songInfo.album;
|
||||||
|
this.data.url = songInfo.url ?? '';
|
||||||
post(this.data);
|
post(this.data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user