added toggle for qq lyrics

This commit is contained in:
UnbreakCode 2022-04-26 14:02:39 +02:00
parent 54dad06e88
commit 399ca6c9a5
5 changed files with 12 additions and 0 deletions

View file

@ -2952,6 +2952,7 @@ const app = new Vue({
}
},
loadQQLyrics() {
if (!app.cfg.lyrics.enable_qq) return;
const track = encodeURIComponent((this.mk.nowPlayingItem != null) ? this.mk.nowPlayingItem.title ?? '' : '');
const artist = encodeURIComponent((this.mk.nowPlayingItem != null) ? this.mk.nowPlayingItem.artistName ?? '' : '');
const time = encodeURIComponent((this.mk.nowPlayingItem != null) ? (Math.round((this.mk.nowPlayingItem.attributes["durationInMillis"] ?? -1000) / 1000) ?? -1) : -1);