9 Commits

Author SHA1 Message Date
MengYX
8acc1ade81 Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/highlight.js-10.4.1' into master 2020-12-19 21:17:27 +08:00
MengYX
e543024641 Bump Version and Update Deps 2020-12-19 21:16:53 +08:00
MengYX
cf48554424 Merge pull request #117 from ix64/fix-qmc-meta
Fix incorrect id3 info for .qmc decryption
2020-12-17 08:36:10 +08:00
MengYX
2e0cd04255 Update new-feature.md 2020-12-10 19:01:54 +08:00
MengYX
adbcdfd083 Update bug-report.md 2020-12-10 19:00:50 +08:00
MengYX
e1505148c8 Add tips for qmc not writing cover 2020-12-06 02:32:57 +08:00
MengYX
b65e47514f Update CI 2020-12-06 02:22:43 +08:00
MengYX
31215772e3 Try to fix .qmc ID3 Info 2020-12-06 02:16:45 +08:00
dependabot[bot]
070c642dbf Bump highlight.js from 10.4.0 to 10.4.1
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 10.4.0 to 10.4.1.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/10.4.0...10.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-04 18:43:39 +00:00
6 changed files with 134 additions and 67 deletions

View File

@@ -7,9 +7,10 @@ assignees: ''
---
- 请按照此模板填写,否则可能立即被关闭
* 请按照此模板填写,否则可能立即被关闭
- [x] 我确认已经搜索过Issue不存并确认相同的Issue
- [x]认为这是程序导致的问题(如不确认,请先通过Telegram或者Email进行咨询
- [x]有证据表明这是程序导致的问题(如不确认,可以在[Discussions](https://github.com/ix64/unlock-music/discussions)内提出
**Bug描述**

View File

@@ -17,7 +17,7 @@ assignees: ''
**实现途径**
- 如果没有设计方案,请简要描述实现思路
- 如果你没有任何的实现思路请通过Telegram进行讨论
- 如果你没有任何的实现思路,请通过[Discussions](https://github.com/ix64/unlock-music/discussions)或者Telegram进行讨论
**附加信息**

View File

@@ -1,7 +1,6 @@
name: Build
on:
push:
branches: [ master ]
paths:
- "**/*.js"
- "**/*.vue"

167
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "unlock-music",
"version": "1.7.1",
"version": "1.7.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -3044,6 +3044,16 @@
"dev": true,
"optional": true
},
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
},
"block-stream": {
"version": "0.0.9",
"resolved": "https://registry.npm.taobao.org/block-stream/download/block-stream-0.0.9.tgz",
@@ -4188,9 +4198,9 @@
}
},
"core-js": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.0.tgz",
"integrity": "sha512-W2VYNB0nwQQE7tKS7HzXd7r2y/y2SVJl4ga6oH/dnaLFzM0o2lB2P3zCkWj5Wc/zyMYjtgd5Hmhk0ObkQFZOIA=="
"version": "3.8.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.1.tgz",
"integrity": "sha512-9Id2xHY1W7m8hCl8NkhQn5CufmF/WuR30BTRewvCXc1aZd3kMECwNZ69ndLbekKfakw9Rf2Xyc+QR6E7Gg+obg=="
},
"core-js-compat": {
"version": "3.8.0",
@@ -5168,6 +5178,7 @@
"version": "1.17.7",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
"integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
"dev": true,
"requires": {
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
@@ -5612,6 +5623,13 @@
"typedarray-to-buffer": "^3.1.5"
}
},
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"filesize": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz",
@@ -6209,9 +6227,9 @@
"dev": true
},
"highlight.js": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.0.tgz",
"integrity": "sha512-EfrUGcQ63oLJbj0J0RI9ebX6TAITbsDBLbsjr881L/X5fMO9+oadKzEF21C7R3ULKG6Gv3uoab2HiqVJa/4+oA==",
"version": "10.4.1",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.1.tgz",
"integrity": "sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg==",
"dev": true
},
"hmac-drbg": {
@@ -6791,9 +6809,9 @@
"integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ=="
},
"is-generator-function": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz",
"integrity": "sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw=="
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.8.tgz",
"integrity": "sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ=="
},
"is-glob": {
"version": "4.0.1",
@@ -6926,14 +6944,36 @@
}
},
"is-typed-array": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.3.tgz",
"integrity": "sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ==",
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.4.tgz",
"integrity": "sha512-ILaRgn4zaSrVNXNGtON6iFNotXW3hAPF3+0fB1usg2jFlWqo5fEDdmJkz0zBfoi7Dgskr8Khi2xZ8cXqZEfXNA==",
"requires": {
"available-typed-arrays": "^1.0.0",
"es-abstract": "^1.17.4",
"available-typed-arrays": "^1.0.2",
"call-bind": "^1.0.0",
"es-abstract": "^1.18.0-next.1",
"foreach": "^2.0.5",
"has-symbols": "^1.0.1"
},
"dependencies": {
"es-abstract": {
"version": "1.18.0-next.1",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
"requires": {
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
"is-negative-zero": "^2.0.0",
"is-regex": "^1.1.1",
"object-inspect": "^1.8.0",
"object-keys": "^1.1.1",
"object.assign": "^4.1.1",
"string.prototype.trimend": "^1.0.1",
"string.prototype.trimstart": "^1.0.1"
}
}
}
},
"is-typedarray": {
@@ -7791,18 +7831,26 @@
"dev": true
},
"music-metadata": {
"version": "7.5.0",
"resolved": "https://registry.npmjs.org/music-metadata/-/music-metadata-7.5.0.tgz",
"integrity": "sha512-PLem0psHyfYfDuZ3ir7EMXsOtkJsCgQNG0e9wvjgYeeAG2WPpwSZkPaTmuJUUIX7hxojj8VhG+iwuz/f+BpXgQ==",
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/music-metadata/-/music-metadata-7.5.2.tgz",
"integrity": "sha512-CgOF4LyHjRjp8pKTovX/dHeH03d01hubsit0/fO4UNkl9+nLdLKs3eqrUcNjf+wbSWyoP3XJz5iF6Yo45zox0g==",
"requires": {
"content-type": "^1.0.4",
"debug": "^4.2.0",
"file-type": "^16.0.0",
"debug": "^4.3.1",
"file-type": "^16.0.1",
"media-typer": "^1.1.0",
"strtok3": "^6.0.4",
"token-types": "^2.0.0"
},
"dependencies": {
"debug": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
"requires": {
"ms": "2.1.2"
}
},
"media-typer": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
@@ -7811,14 +7859,14 @@
}
},
"music-metadata-browser": {
"version": "2.1.6",
"resolved": "https://registry.npmjs.org/music-metadata-browser/-/music-metadata-browser-2.1.6.tgz",
"integrity": "sha512-H844nlhqUys/1GiEe12w42sq8XL+fjk6sd8rIllabqRKZrOUNuTKSOy/x6edHhvvknZfhbYU4MMjbT2D3iEP2Q==",
"version": "2.1.7",
"resolved": "https://registry.npmjs.org/music-metadata-browser/-/music-metadata-browser-2.1.7.tgz",
"integrity": "sha512-JOc0TBbIjFtDgoPr+im4wRYE+R6RgMeCQ5pvHqQ1YSzoop/S/aNsd7vj/qVUClodCMLEOChTzRwH68tcx3IHtw==",
"requires": {
"assert": "^2.0.0",
"buffer": "^5.7.0",
"buffer": "^6.0.1",
"debug": "^4.0.1",
"music-metadata": "^7.5.0",
"music-metadata": "^7.5.2",
"readable-stream": "^3.6.0",
"readable-web-to-node-stream": "^3.0.0",
"remove": "^0.1.5",
@@ -7837,14 +7885,19 @@
}
},
"buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
"ieee754": "^1.2.1"
}
},
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
@@ -9789,9 +9842,9 @@
}
},
"register-service-worker": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/register-service-worker/-/register-service-worker-1.7.1.tgz",
"integrity": "sha512-IdTfUZ4u8iJL8o1w8es8l6UMGPmkwHolUdT+UmM1UypC80IB4KbpuIlvwWVj8UDS7eJwkEYRcKRgfRX+oTmJsw=="
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/register-service-worker/-/register-service-worker-1.7.2.tgz",
"integrity": "sha512-CiD3ZSanZqcMPRhtfct5K9f7i3OLCcBBWsJjLh1gW9RO/nS94sVzY59iS+fgYBOBqaBpf4EzfqUF3j9IG+xo8A=="
},
"regjsgen": {
"version": "0.5.2",
@@ -11822,11 +11875,10 @@
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.0.0",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0.tgz",
"integrity": "sha512-R20f4PWe34dqhTZ9tkyFd6nfjxEbLBHbFOsN38qg0Jl8GKMfmoyc/E8vVjjRkunE6qCydpPoH7f/tW13bD6+JA==",
"version": "npm:vue-loader@16.1.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.1.1.tgz",
"integrity": "sha512-wz/+HFg/3SBayHWAlZXARcnDTl3VOChrfW9YnxvAweiuyKX/7IGx1ad/4yJHmwhgWlOVYMAbTiI7GV8G33PfGQ==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
@@ -11838,7 +11890,6 @@
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
@@ -11848,7 +11899,6 @@
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
@@ -11859,7 +11909,6 @@
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
@@ -11868,22 +11917,19 @@
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
"dev": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
"dev": true
},
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
@@ -11895,7 +11941,6 @@
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
@@ -12016,6 +12061,7 @@
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
},
@@ -12321,6 +12367,7 @@
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
},
@@ -12558,16 +12605,38 @@
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
},
"which-typed-array": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.2.tgz",
"integrity": "sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ==",
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz",
"integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==",
"requires": {
"available-typed-arrays": "^1.0.2",
"es-abstract": "^1.17.5",
"call-bind": "^1.0.0",
"es-abstract": "^1.18.0-next.1",
"foreach": "^2.0.5",
"function-bind": "^1.1.1",
"has-symbols": "^1.0.1",
"is-typed-array": "^1.1.3"
},
"dependencies": {
"es-abstract": {
"version": "1.18.0-next.1",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
"requires": {
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
"is-negative-zero": "^2.0.0",
"is-regex": "^1.1.1",
"object-inspect": "^1.8.0",
"object-keys": "^1.1.1",
"object.assign": "^4.1.1",
"string.prototype.trimend": "^1.0.1",
"string.prototype.trimstart": "^1.0.1"
}
}
}
},
"wide-align": {

View File

@@ -1,7 +1,7 @@
{
"name": "unlock-music",
"version": "1.7.1",
"updateInfo": "适配深色模式;修复.ncm解锁的一些问题",
"version": "1.7.2",
"updateInfo": "修复.qmc解锁的一些问题",
"license": "MIT",
"description": "Unlock encrypted music file in browser.",
"repository": {
@@ -17,15 +17,15 @@
"dependencies": {
"base64-js": "^1.5.1",
"browser-id3-writer": "^4.4.0",
"core-js": "^3.8.0",
"core-js": "^3.8.1",
"crypto-js": "^4.0.0",
"element-ui": "^2.14.1",
"iconv-lite": "^0.5.1",
"jimp": "^0.14.0",
"metaflac-js": "^1.0.5",
"music-metadata-browser": "^2.1.6",
"music-metadata-browser": "^2.1.7",
"node-sass": "^4.14.1",
"register-service-worker": "^1.7.1",
"register-service-worker": "^1.7.2",
"sass-loader": "^10.0.2",
"vue": "^2.6.12"
},

View File

@@ -5,7 +5,8 @@ import {
GetFileInfo,
GetMetaCoverURL,
GetWebImage,
IXAREA_API_ENDPOINT
IXAREA_API_ENDPOINT,
WriteMp3Meta
} from "./util";
import {QmcMaskCreate58, QmcMaskDetectMflac, QmcMaskDetectMgg, QmcMaskGetDefault} from "./qmcMask";
import {fromByteArray as Base64Encode, toByteArray as Base64Decode} from 'base64-js'
@@ -85,20 +86,17 @@ export async function Decrypt(file, raw_filename, raw_ext) {
imgUrl = imageInfo.url
try {
if (ext === "mp3") {
let writer = new ID3Writer(musicDecoded)
writer.setFrame('APIC', {
type: 3,
data: imageInfo.buffer,
description: "Cover",
})
writer.addTag();
musicDecoded = writer.arrayBuffer
musicDecoded = await WriteMp3Meta(musicDecoded,
info.artist.split(" _ "), info.title, "",
imageInfo.buffer, "Cover", musicMeta)
musicBlob = new Blob([musicDecoded], {type: mime});
} else if (ext === 'flac') {
const writer = new MetaFlac(Buffer.from(musicDecoded))
writer.importPictureFromBuffer(Buffer.from(imageInfo.buffer))
musicDecoded = writer.save()
musicBlob = new Blob([musicDecoded], {type: mime});
} else {
console.info("writing metadata for " + ext + " is not being supported for now")
}
} catch (e) {
console.warn("Error while appending cover image to file " + e)