fix mpris

This commit is contained in:
Araxeus
2021-11-10 00:53:44 +02:00
parent f40ed04899
commit ccfe7434bf
5 changed files with 113 additions and 50 deletions

View File

@ -45,6 +45,7 @@ const songInfo = {
songDuration: 0,
elapsedSeconds: 0,
url: "",
videoId: "",
};
const handleData = async (responseText, win) => {
@ -57,6 +58,7 @@ const handleData = async (responseText, win) => {
songInfo.image = await getImage(songInfo.imageSrc);
songInfo.uploadDate = data?.microformat?.microformatDataRenderer?.uploadDate;
songInfo.url = data?.microformat?.microformatDataRenderer?.urlCanonical?.split("&")[0];
songInfo.videoId = data?.videoDetails?.videoId;
// used for options.resumeOnStart
config.set("url", data?.microformat?.microformatDataRenderer?.urlCanonical);