This commit is contained in:
Maikiwi 2022-02-04 21:25:46 -08:00
parent 9b31e8a905
commit e7af918280
2 changed files with 32 additions and 11 deletions

View file

@ -822,6 +822,7 @@ const app = new Vue({
// app.getNowPlayingArtwork(42);
app.getNowPlayingArtworkBG(32);
app.loadLyrics();
app.losslessBadge();
// Playback Notifications
if (this.cfg.general.playbackNotifications && !document.hasFocus() && a.artistName && a.artwork && a.name) {
@ -2345,6 +2346,23 @@ const app = new Vue({
self.getLibrarySongsFull(true)
})
},
async losslessBadge() {
const songID = (this.mk.nowPlayingItem != null) ? this.mk.nowPlayingItem["_songId"] ?? -1 : -1;
// this.getMXM( trackName, artistName, 'en', duration);
if (app.cfg.audio.quality == 2304 && app.cfg.advanced.decryptLLPW && songID != -1) {
let extendedAssets = app.mk.api.song(songID, {extend : 'extendedAssetUrls'})
if (extendedAssets.attributes.audioTraits.includes('lossless')) {
app.mk.nowPlayingItem['attributes']['lossless'] = true
CiderAudio.audioNodes.llpwEnabled = 1}
else {
CiderAudio.audioNodes.llpwEnabled = 0
}
}
else {
CiderAudio.audioNodes.llpwEnabled = 0
}
},
async loadYTLyrics() {
const track = (this.mk.nowPlayingItem != null) ? this.mk.nowPlayingItem.title ?? '' : '';
const artist = (this.mk.nowPlayingItem != null) ? this.mk.nowPlayingItem.artistName ?? '' : '';