From fdadd285a0dc2d6df6a7a4319a82af513b2242b4 Mon Sep 17 00:00:00 2001 From: maikirakiwi Date: Sun, 3 Jul 2022 01:48:53 -0700 Subject: [PATCH] pokemon gotta catch them all v5 --- src/renderer/main/vueapp.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/main/vueapp.js b/src/renderer/main/vueapp.js index e490e53d..c1b4026c 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -989,7 +989,11 @@ const app = new Vue({ } if (previewURL == null && ((app.mk.nowPlayingItem?._songId ?? (app.mk.nowPlayingItem["songId"] ?? app.mk.nowPlayingItem.relationships.catalog.data[0].id)) != -1)) { app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/songs/${app.mk.nowPlayingItem?._songId ?? (app.mk.nowPlayingItem["songId"] ?? app.mk.nowPlayingItem.relationships.catalog.data[0].id)}`).then((response) => { - try {previewURL = response.data.data[0].attributes.previews[0].url;} catch(e) {} + try {previewURL = response.data.data[0].attributes.previews[0].url;} catch(e) { + if (e instanceof TypeError === false) { console.debug("[Cider][MaikiwiSoundCheck] normalizer function err: " + e) } + else { + if (localFiles === true) {CiderAudio.audioNodes.gainNode.gain.value = 0.8222426499470}} + } if (previewURL) { console.debug("[Cider][MaikiwiSoundCheck] previewURL response.data.data[0].attributes.previews[0].url: " + previewURL) ipcRenderer.send('getPreviewURL', previewURL)