From 9af2ba5e62b1134f5cbd1411adcf55e52cf65c37 Mon Sep 17 00:00:00 2001 From: MengYX Date: Sat, 15 Aug 2020 10:30:13 +0800 Subject: [PATCH 1/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7b74d81..a9062a3 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ # 使用方法 ## 使用已构建版本 - 从[GitHub Release](https://github.com/ix64/unlock-music/releases/latest)下载已构建的版本 + - 本地使用请下载`legacy版本`(`modern版本`只能通过**http/https协议**访问) - 解压缩后即可部署或本地使用(**请勿直接运行源代码**) ## 自行构建 From 6ef0850c400db23a7b690102c81a892dac4c8cfe Mon Sep 17 00:00:00 2001 From: MengYX Date: Tue, 1 Sep 2020 23:17:17 +0800 Subject: [PATCH 2/3] Use Small Cover Image for .ncm --- src/decrypt/ncm.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/decrypt/ncm.js b/src/decrypt/ncm.js index 8190c5e..9d43863 100644 --- a/src/decrypt/ncm.js +++ b/src/decrypt/ncm.js @@ -164,7 +164,9 @@ function getMetaData(dataView, fileBuffer, offset) { if (plainText.slice(0, labelIndex) === "dj") { result = result.mainMusic; } - if (!!result.albumPic) result.albumPic = result.albumPic.replace("http://", "https://"); + if (!!result.albumPic && result.albumPic !== "") + result.albumPic = result.albumPic.replace("http://", "https://") + "?param=500y500"; + return {data: result, offset: offset}; } From ad47a713ad97c7de765af0586a3c02e979abfc99 Mon Sep 17 00:00:00 2001 From: MengYX Date: Tue, 1 Sep 2020 23:26:02 +0800 Subject: [PATCH 3/3] Add Tips for .kgm while using "file:" protocol --- src/App.vue | 20 ++++++++++---------- src/decrypt/kgm.js | 7 ++++++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/App.vue b/src/App.vue index b5fba53..2295a70 100644 --- a/src/App.vue +++ b/src/App.vue @@ -100,16 +100,16 @@ } catch (e) { } if ((!!updateInfo && process.env.NODE_ENV === 'production') && (!!updateInfo.HttpsFound || - (!!updateInfo.Found && window.location.protocol !== "https:"))) { - this.$notify.warning({ - title: '发现更新', - message: '发现新版本 v' + updateInfo.Version + - '
更新详情:' + updateInfo.Detail + - '
获取更新', - dangerouslyUseHTMLString: true, - duration: 15000, - position: 'top-left' - }); + (!!updateInfo.Found && document.location.protocol !== "https:"))) { + this.$notify.warning({ + title: '发现更新', + message: '发现新版本 v' + updateInfo.Version + + '
更新详情:' + updateInfo.Detail + + '
获取更新', + dangerouslyUseHTMLString: true, + duration: 15000, + position: 'top-left' + }); } else { this.$notify.info({ title: '离线使用', diff --git a/src/decrypt/kgm.js b/src/decrypt/kgm.js index fbcc416..62d915f 100644 --- a/src/decrypt/kgm.js +++ b/src/decrypt/kgm.js @@ -10,9 +10,14 @@ const KgmHeader = [ const VprMaskDiff = [0x25, 0xDF, 0xE8, 0xA6, 0x75, 0x1E, 0x75, 0x0E, 0x2F, 0x80, 0xF3, 0x2D, 0xB8, 0xB6, 0xE3, 0x11, 0x00] -const PreDefinedKey = "MoOtOiTvINGwd2E6n0E1i7L5t2IoOoNk" export async function Decrypt(file, raw_filename, raw_ext) { + if (document.location.protocol === "file:") { + return { + status: false, + message: "请使用CLI版本进行解锁" + } + } const oriData = new Uint8Array(await GetArrayBuffer(file)); if (raw_ext === "vpr") { if (!IsBytesEqual(VprHeader, oriData.slice(0, 0x10)))