ncm2mp3 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +5 -6
- package/package.json +3 -2
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import crypto from 'crypto'
|
|
3
|
+
import NodeID3 from 'node-id3';
|
|
4
4
|
function aes128EcbDecrypt(encrypted,secretKey) {
|
|
5
5
|
try {
|
|
6
6
|
// 1. 将十六进制密钥转换为 Buffer (这正是你之前学习的 Buffer 转换)
|
|
@@ -191,8 +191,7 @@ class Ncm{
|
|
|
191
191
|
* @param {string} mp3file - file path to the target file.
|
|
192
192
|
* @returns
|
|
193
193
|
*/
|
|
194
|
-
async function convertNcm(ncmfile,mp3file){
|
|
194
|
+
export async function convertNcm(ncmfile,mp3file){
|
|
195
195
|
const ncm = new Ncm(ncmfile,mp3file);
|
|
196
196
|
return await ncm.turnUp();
|
|
197
|
-
}
|
|
198
|
-
module.exports = {convertNcm}
|
|
197
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ncm2mp3",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Use this moudle to convert ncm file to mp3 file.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ncm",
|
|
@@ -15,5 +15,6 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"node-id3": "^0.2.9"
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
"type": "module"
|
|
19
20
|
}
|