fix lyrics priority and pip

This commit is contained in:
vapormusic 2022-10-13 20:16:28 +07:00
parent 5fd1667e41
commit 9622814ebf
4 changed files with 27 additions and 15 deletions

View file

@ -3267,7 +3267,9 @@ const app = new Vue({
this.loadYTLyrics();
} else {
// only load MXM lyrics if AM lyrics failed to load
this.loadAMLyrics();
if (app.cfg.lyrics.enable_mxm) {
this.loadMXM();} else {
this.loadAMLyrics();}
}
},
async loadAMLyrics() {
@ -3279,10 +3281,16 @@ const app = new Vue({
this.lyricsMediaItem = response.data?.data[0]?.attributes["ttml"];
this.parseTTML();
} catch (_) {
this.loadMXM();
if (app.cfg.lyrics.enable_mxm) {
this.loadQQLyrics()
} else {
this.loadMXM();}
}
} else {
this.loadMXM();
if (app.cfg.lyrics.enable_mxm) {
this.loadQQLyrics() // since mxm is already prioritized, we can just load qq lyrics if am fails
} else {
this.loadMXM();}
}
},
addToLibrary(id) {
@ -3415,8 +3423,7 @@ const app = new Vue({
}
if (lrcfile === "") {
app.loadQQLyrics();
// app.loadAMLyrics()
app.loadAMLyrics()
} else {
if (richsync == [] || richsync.length == 0) {
console.log("musixmatch worki");
@ -3468,20 +3475,17 @@ const app = new Vue({
}
} catch (e) {
console.log(e);
app.loadQQLyrics();
// app.loadAMLyrics()
app.loadAMLyrics()
}
}
} catch (e) {
console.error(e);
app.loadQQLyrics();
//app.loadAMLyrics()
app.loadAMLyrics()
}
};
req.onerror = function () {
app.loadQQLyrics();
console.log("error");
// app.loadAMLyrics();
app.loadAMLyrics();
};
req.open("POST", url, true);
req.send();