From ea7547547bdbd691b3915606b7b00f7c8d27d628 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Fri, 28 Jan 2022 23:54:54 +0700 Subject: [PATCH 1/3] dont copy the app instance here --- src/renderer/views/pages/library-videos.ejs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/renderer/views/pages/library-videos.ejs b/src/renderer/views/pages/library-videos.ejs index 69fe24c6..a1b8d6fa 100644 --- a/src/renderer/views/pages/library-videos.ejs +++ b/src/renderer/views/pages/library-videos.ejs @@ -18,15 +18,13 @@ props: ["data"], data: function(){ return { - app : this.$root, videos: [], } }, mounted() { this.$nextTick(async function () { if (this.$data.videos == null || this.$data.videos.length == 0) - this.$data.videos = (await app.mk.api.v3.music('/v1/me/library/music-videos')).data?.data ?? [] - console.log(this.$data.videos.length > 0) + this.$data.videos = (await this.$root.mk.api.v3.music('/v1/me/library/music-videos')).data?.data ?? [] }) } }) From eec8e395562835dc612bc387b07ffc8290542692 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Sat, 29 Jan 2022 00:02:23 +0700 Subject: [PATCH 2/3] bruh why --- src/preload/cider-preload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preload/cider-preload.js b/src/preload/cider-preload.js index 94413a69..3e13e908 100644 --- a/src/preload/cider-preload.js +++ b/src/preload/cider-preload.js @@ -50,7 +50,7 @@ const MusicKitInterop = { attributes.artwork.url = (attributes?.artwork?.url ?? '').replace(`{f}`, "png"); attributes.playParams = attributes?.playParams ?? {id: 'no-id-found'}; attributes.playParams.id = attributes?.playParams?.id ?? 'no-id-found'; - attributes.playParams.songid = nowPlayingItem.songId ?? 'no-id-found' + attributes.playParams.songid = nowPlayingItem._songId ?? 'no-id-found' attributes.url = { cider: "https://cider.sh/p?id=" + attributes.playParams.id, appleMusic: "https://music.apple.com/song/" + nowPlayingItem.songId From 0b76426ca6064b1e16c0bbada2092c11beeaf5a8 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Sat, 29 Jan 2022 00:04:56 +0700 Subject: [PATCH 3/3] fix --- src/preload/cider-preload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preload/cider-preload.js b/src/preload/cider-preload.js index 3e13e908..f58f6ab8 100644 --- a/src/preload/cider-preload.js +++ b/src/preload/cider-preload.js @@ -50,10 +50,10 @@ const MusicKitInterop = { attributes.artwork.url = (attributes?.artwork?.url ?? '').replace(`{f}`, "png"); attributes.playParams = attributes?.playParams ?? {id: 'no-id-found'}; attributes.playParams.id = attributes?.playParams?.id ?? 'no-id-found'; - attributes.playParams.songid = nowPlayingItem._songId ?? 'no-id-found' + attributes.playParams.songid = nowPlayingItem._songId ?? attributes?.playParams?.id ?? 'no-id-found' attributes.url = { cider: "https://cider.sh/p?id=" + attributes.playParams.id, - appleMusic: "https://music.apple.com/song/" + nowPlayingItem.songId + appleMusic: "https://music.apple.com/song/" + (nowPlayingItem._songId ?? attributes?.playParams?.id ?? 'no-id-found') } if (attributes.playParams.id === 'no-id-found') { attributes.playParams.id = nowPlayingItem?.id ?? 'no-id-found';