migu-api-enhanced 2.27.5 → 2.28.3

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.
Files changed (90) hide show
  1. package/README.md +6 -6
  2. package/dist/YDRZ-JLSMOCYV.cjs +12 -0
  3. package/dist/YDRZ-JLSMOCYV.cjs.map +1 -0
  4. package/dist/YDRZ-PHOHCFZ7.mjs +12 -0
  5. package/dist/activity/index.cjs +10 -10
  6. package/dist/activity/index.cjs.map +1 -1
  7. package/dist/activity/index.mjs +5 -5
  8. package/dist/activity/index.mjs.map +1 -1
  9. package/dist/chunk-4LG74IW5.cjs +38 -0
  10. package/dist/chunk-4LG74IW5.cjs.map +1 -0
  11. package/dist/chunk-CGV2KEQH.mjs +38 -0
  12. package/dist/chunk-CGV2KEQH.mjs.map +1 -0
  13. package/dist/{chunk-HBSVQAOM.cjs → chunk-EJRBQONV.cjs} +17 -16
  14. package/dist/chunk-EJRBQONV.cjs.map +1 -0
  15. package/dist/{chunk-4ZNJQZKT.mjs → chunk-GU4YGYF5.mjs} +22 -29
  16. package/dist/chunk-GU4YGYF5.mjs.map +1 -0
  17. package/dist/chunk-KFBODHXY.mjs +438 -0
  18. package/dist/chunk-KFBODHXY.mjs.map +1 -0
  19. package/dist/chunk-KGXC32BN.cjs.map +1 -1
  20. package/dist/chunk-RKEORE6S.mjs +34 -0
  21. package/dist/{chunk-BNSCQPYL.mjs.map → chunk-RKEORE6S.mjs.map} +1 -1
  22. package/dist/{chunk-ZEGJU5LW.cjs → chunk-TVZESJ3J.cjs} +26 -33
  23. package/dist/chunk-TVZESJ3J.cjs.map +1 -0
  24. package/dist/{chunk-ID6VPLAX.mjs → chunk-VD7HOOHT.mjs} +16 -15
  25. package/dist/chunk-VD7HOOHT.mjs.map +1 -0
  26. package/dist/chunk-XQIVVOH2.cjs +34 -0
  27. package/dist/chunk-XQIVVOH2.cjs.map +1 -0
  28. package/dist/chunk-Y6RTHMBM.cjs +438 -0
  29. package/dist/chunk-Y6RTHMBM.cjs.map +1 -0
  30. package/dist/decryptMrc-OOH5UIFN.cjs.map +1 -1
  31. package/dist/index.cjs +308 -244
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +934 -46
  34. package/dist/index.d.ts +934 -46
  35. package/dist/index.mjs +180 -116
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/login/index.cjs +81 -95
  38. package/dist/login/index.cjs.map +1 -1
  39. package/dist/login/index.mjs +76 -90
  40. package/dist/login/index.mjs.map +1 -1
  41. package/dist/mrc/index.cjs +7 -4
  42. package/dist/mrc/index.cjs.map +1 -1
  43. package/dist/mrc/index.mjs +6 -3
  44. package/dist/mrc/index.mjs.map +1 -1
  45. package/dist/{chunk-TOFOR57V.cjs → publicKey-K56XCMLR.cjs} +3 -4
  46. package/dist/publicKey-K56XCMLR.cjs.map +1 -0
  47. package/dist/{chunk-JRQEIAY5.mjs → publicKey-UVL2ID6N.mjs} +2 -3
  48. package/dist/rsalib-FMWPCK5N.mjs +9 -0
  49. package/dist/rsalib-VSMUMKOT.cjs +9 -0
  50. package/dist/rsalib-VSMUMKOT.cjs.map +1 -0
  51. package/dist/utils/index.cjs +184 -15
  52. package/dist/utils/index.cjs.map +1 -1
  53. package/dist/utils/index.d.cts +28 -14
  54. package/dist/utils/index.d.ts +28 -14
  55. package/dist/utils/index.mjs +192 -23
  56. package/dist/utils/index.mjs.map +1 -1
  57. package/package.json +8 -5
  58. package/dist/YDRZ-M2NM4ZC5.mjs +0 -11
  59. package/dist/YDRZ-OJHYOY7I.cjs +0 -11
  60. package/dist/YDRZ-OJHYOY7I.cjs.map +0 -1
  61. package/dist/chunk-4ZNJQZKT.mjs.map +0 -1
  62. package/dist/chunk-6EZ26DPY.cjs +0 -18
  63. package/dist/chunk-6EZ26DPY.cjs.map +0 -1
  64. package/dist/chunk-BNSCQPYL.mjs +0 -18
  65. package/dist/chunk-C56WQXBU.cjs +0 -13
  66. package/dist/chunk-C56WQXBU.cjs.map +0 -1
  67. package/dist/chunk-FT3OOTMT.cjs +0 -140
  68. package/dist/chunk-FT3OOTMT.cjs.map +0 -1
  69. package/dist/chunk-HBSVQAOM.cjs.map +0 -1
  70. package/dist/chunk-HDGZY5R6.mjs +0 -13
  71. package/dist/chunk-HDGZY5R6.mjs.map +0 -1
  72. package/dist/chunk-ID6VPLAX.mjs.map +0 -1
  73. package/dist/chunk-QMBC3CRQ.mjs +0 -51
  74. package/dist/chunk-QMBC3CRQ.mjs.map +0 -1
  75. package/dist/chunk-TIKOSETY.cjs +0 -51
  76. package/dist/chunk-TIKOSETY.cjs.map +0 -1
  77. package/dist/chunk-TOFOR57V.cjs.map +0 -1
  78. package/dist/chunk-Y4SLGNQ3.mjs +0 -140
  79. package/dist/chunk-Y4SLGNQ3.mjs.map +0 -1
  80. package/dist/chunk-ZEGJU5LW.cjs.map +0 -1
  81. package/dist/publicKey-EHY5LDOP.cjs +0 -8
  82. package/dist/publicKey-EHY5LDOP.cjs.map +0 -1
  83. package/dist/publicKey-LX6G3T7L.mjs +0 -8
  84. package/dist/rsalib-GGMEGQT2.cjs +0 -9
  85. package/dist/rsalib-GGMEGQT2.cjs.map +0 -1
  86. package/dist/rsalib-HO4SSCTO.mjs +0 -9
  87. package/dist/rsalib-HO4SSCTO.mjs.map +0 -1
  88. /package/dist/{YDRZ-M2NM4ZC5.mjs.map → YDRZ-PHOHCFZ7.mjs.map} +0 -0
  89. /package/dist/{chunk-JRQEIAY5.mjs.map → publicKey-UVL2ID6N.mjs.map} +0 -0
  90. /package/dist/{publicKey-LX6G3T7L.mjs.map → rsalib-FMWPCK5N.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -1,13 +1,14 @@
1
1
  import {
2
- changeQuality
3
- } from "./chunk-Y4SLGNQ3.mjs";
2
+ decryptData
3
+ } from "./chunk-CGV2KEQH.mjs";
4
4
  import {
5
5
  getDeviceId
6
- } from "./chunk-BNSCQPYL.mjs";
6
+ } from "./chunk-RKEORE6S.mjs";
7
7
  import {
8
+ _fetch,
8
9
  ckfetch,
9
10
  h5fetch
10
- } from "./chunk-4ZNJQZKT.mjs";
11
+ } from "./chunk-GU4YGYF5.mjs";
11
12
 
12
13
  // src/modules/search.ts
13
14
  var searchSong = async (text, page = 1) => {
@@ -54,8 +55,64 @@ var searchSuggest = async (text) => {
54
55
  return await h5fetch(`https://app.c.nf.migu.cn/bmw/search/suggest/v1.0?text=${text}`);
55
56
  };
56
57
 
57
- // src/modules/search_rbt.ts
58
- var searchRbt = async (text, page = 1) => {
58
+ // src/modules/search_crbt.ts
59
+ var searchCrbt = async (text, page = 1) => {
60
+ const res = await h5fetch(
61
+ "https://c.musicapp.migu.cn/MIGUM2.0/v1.0/content/tone_search_all.do",
62
+ {
63
+ params: {
64
+ pageNo: page ?? 1,
65
+ text
66
+ }
67
+ }
68
+ );
69
+ const items = res.data?.toneList.map((item) => {
70
+ const rbt = item.rbtSongItem || {};
71
+ const highlights = rbt.highLight || [];
72
+ const singerList = (rbt.singer.split("|") || []).map((name) => ({
73
+ "id": "",
74
+ "name": name,
75
+ "img": "",
76
+ "nameSpelling": ""
77
+ }));
78
+ return { song: {
79
+ "resourceType": rbt.resourceType,
80
+ "contentId": rbt.contentId,
81
+ "songId": rbt.songId,
82
+ "songName": rbt.songName,
83
+ "copyrightId": rbt.copyrightId,
84
+ "copyrightType": parseInt(rbt.copyright),
85
+ "ringToneId": rbt.contentId,
86
+ "ringCopyrightId": rbt.copyrightId,
87
+ "haveShockRing": 1,
88
+ "relatedSongs": rbt.relatedSongs || [],
89
+ "duration": 0,
90
+ "img1": rbt.imgItems?.[0]?.img || "",
91
+ "img2": rbt.imgItems?.[1]?.img || "",
92
+ "img3": rbt.imgItems?.[2]?.img || "",
93
+ "singerList": singerList,
94
+ "highlights": highlights,
95
+ // new
96
+ validTime: rbt.validTime,
97
+ price: rbt.price,
98
+ status: rbt.status,
99
+ vipType: rbt.vipType,
100
+ showLabels: rbt.showLabels || [],
101
+ opNumItem: rbt.opNumItem || {}
102
+ } };
103
+ }) || [];
104
+ return {
105
+ code: res.code,
106
+ info: res.info,
107
+ data: {
108
+ hasNext: res.data?.toneList?.length === 30,
109
+ items
110
+ }
111
+ };
112
+ };
113
+
114
+ // src/modules/search_vrbt.ts
115
+ var searchVrbt = async (text, page = 1) => {
59
116
  return await h5fetch(`https://app.c.nf.migu.cn/bmw/search/rbt/v1.0?pageNo=${page}&text=${text}`);
60
117
  };
61
118
 
@@ -180,7 +237,7 @@ var getResourceInfo = async (resourceIds = "", copyrightIds = "", resourceType =
180
237
  // src/modules/can-listen.ts
181
238
  var checkCanListen = async (contentIds) => {
182
239
  return await h5fetch(
183
- `https://app.c.nf.migu.cn/strategy/pc/can-listen/v1.0`,
240
+ `https://app.c.vip.migu.cn/strategy/pc/can-listen/v1.0`,
184
241
  {
185
242
  method: "post",
186
243
  headers: {
@@ -202,21 +259,23 @@ var getOpNum = async (ids) => {
202
259
 
203
260
  // src/modules/url_v1.ts
204
261
  var getUrlV1 = async (contentId, copyrightId, toneFlag = "PQ", resourceType = "2") => {
205
- const data = await h5fetch(
206
- `https://app.c.nf.migu.cn/MIGUM3.0/strategy/pc/listen/v1.0?contentId=${contentId}&copyrightId=${copyrightId}&resourceType=${resourceType}&toneFlag=PQ`,
262
+ return await h5fetch(
263
+ `https://app.c.vip.migu.cn/MIGUM3.0/strategy/pc/listen/v1.0`,
207
264
  {
265
+ params: {
266
+ contentId,
267
+ copyrightId,
268
+ resourceType,
269
+ toneFlag: "PQ"
270
+ },
208
271
  headers: {
209
272
  "Channel": "014X031"
210
273
  }
211
274
  }
212
275
  );
213
- data.data.oriUrl = data.data.url || "";
214
- data.data.url = changeQuality(data.data.url || "", toneFlag, "PQ", true);
215
- return data;
216
276
  };
217
277
 
218
278
  // src/modules/url_v2.ts
219
- import axios from "axios";
220
279
  var getUrlV2 = async (contentId, copyrightId, toneFlag = "PQ", pacmtoken = "") => {
221
280
  const deviceId = getDeviceId();
222
281
  const timestamp = Date.now();
@@ -233,48 +292,25 @@ var getUrlV2 = async (contentId, copyrightId, toneFlag = "PQ", pacmtoken = "") =
233
292
  "timestamp": timestamp.toString(),
234
293
  "referer": "https://music.migu.cn/"
235
294
  };
236
- const res = await axios.get(
237
- `https://app.c.nf.migu.cn/strategy/pc/listen/v2.0?contentId=${contentId}&copyrightId=${copyrightId}&scene=&netType=01&resourceType=2&toneFlag=${toneFlag}`,
295
+ const buf = await h5fetch(
296
+ `https://app.c.nf.migu.cn/strategy/pc/listen/v2.0`,
238
297
  {
298
+ params: {
299
+ contentId,
300
+ copyrightId,
301
+ scene: "",
302
+ netType: "01",
303
+ resourceType: "2",
304
+ toneFlag
305
+ },
239
306
  headers,
240
307
  responseType: "arraybuffer"
241
308
  }
242
309
  );
243
- return await decryptData(res.data);
244
- };
245
- var SECURE = "Jk8qzuePiJ1qE3mDYhLQ3T73DtDoAhLP";
246
- var aw = 171;
247
- var iw = 205;
248
- var ow = 1;
249
- function textEncode(e) {
250
- return new TextEncoder().encode(e);
251
- }
252
- function textDecode(e) {
253
- return new TextDecoder("utf-8").decode(e);
254
- }
255
- function decryptBlob(e, r) {
256
- if (r.length == 0)
257
- return null;
258
- var n = e.length;
259
- if (n < 4 || !(e[0] == aw && e[1] == iw) || e[2] != ow)
260
- return null;
261
- for (var t = e[3], a = textEncode(r), i = a.length, o = new Uint8Array(n - 4), s = 0, c = 4; c < n; c++, s++)
262
- o[s] = e[c] + t - a[s % i];
263
- return o;
264
- }
265
- function decryptData(buf) {
266
- let l = buf, a = SECURE, u = decryptBlob(new Uint8Array(l), a), p = u ? textDecode(u) : null;
267
- try {
268
- const data = p ? JSON.parse(p) : null;
269
- return data;
270
- } catch (e) {
271
- return null;
272
- }
273
- ;
274
- }
310
+ return decryptData(buf);
311
+ };
275
312
 
276
313
  // src/modules/url_h5v2.4.ts
277
- import axios2 from "axios";
278
314
  var getUrlH5V24 = async (contentId, copyrightId, toneFlag = "PQ") => {
279
315
  const headers = {
280
316
  "birth": "h5page",
@@ -283,55 +319,14 @@ var getUrlH5V24 = async (contentId, copyrightId, toneFlag = "PQ") => {
283
319
  "location-data": "30.6698676660,104.1229614820",
284
320
  "location-info": ""
285
321
  };
286
- const res = await axios2.get(
322
+ const buf = await h5fetch(
287
323
  `https://c.musicapp.migu.cn/strategy/listen-url/h5/v2.4?contentId=${contentId}&copyrightId=${copyrightId}&resourceType=2&netType=01&toneFlag=PQ&scene=&lowerQualityContentId=${contentId}`,
288
324
  {
289
325
  headers,
290
326
  responseType: "arraybuffer"
291
327
  }
292
328
  );
293
- const data = await decryptData2(res.data);
294
- if (data?.data?.url === "") {
295
- return { success: false, error: "URL \u4E3A\u7A7A" };
296
- }
297
- data.data.oriUrl = data.data.url || "";
298
- data.data.url = changeQuality(data.data.url || "", toneFlag, "PQ", true);
299
- return data;
300
- };
301
- var SECURE2 = ["Jk8qzuePiJ1qE3mDYhLQ3T73DtDoAhLP"];
302
- function strToUtf8Bytes(e) {
303
- return new TextEncoder().encode(e);
304
- }
305
- function utf8Bytes2str(bytes) {
306
- const result = [];
307
- for (const byte of bytes) {
308
- if (byte < 16) {
309
- result.push(String.fromCharCode(byte));
310
- } else {
311
- result.push("%");
312
- result.push(byte.toString(16));
313
- }
314
- }
315
- return decodeURIComponent(result.join(""));
316
- }
317
- function decode(e, t) {
318
- if (0 == t.length)
319
- return null;
320
- var n = e.length;
321
- if (n < 4)
322
- return null;
323
- if (171 != e[0] || 205 != e[1])
324
- return null;
325
- if (1 != e[2])
326
- return null;
327
- for (var r = e[3], o = strToUtf8Bytes(t), a = o.length, i = new Uint8Array(n - 4), s = 0, c = 4; c < n; c++, s++)
328
- i[s] = e[c] + r - o[s % a];
329
- return i;
330
- }
331
- var decryptData2 = (ab) => {
332
- const r = decode(new Uint8Array(ab), SECURE2[0]);
333
- const d = utf8Bytes2str(r);
334
- return JSON.parse(d);
329
+ return decryptData(buf);
335
330
  };
336
331
 
337
332
  // src/modules/version.ts
@@ -380,7 +375,7 @@ var checkToken = async (token = "") => {
380
375
  };
381
376
 
382
377
  // src/modules/passport_pacmToken.ts
383
- var getPacmToken = async (token = "", type = "2", sourceId = "220029", activityId = "MUSIC-WWW") => {
378
+ var getPacmToken = async (token, type = "2", sourceId = "220029", activityId = "MUSIC-WWW") => {
384
379
  const { data, cookies } = await ckfetch(
385
380
  `https://c.musicapp.migu.cn/user/h5/token-validate/v3.0?token=${token}&type=${type}&sourceId=${sourceId}&activityId=${activityId}`,
386
381
  {
@@ -529,7 +524,7 @@ var getSVideoSearchSuggest = async (text) => {
529
524
  // src/modules/svideo_url.ts
530
525
  var getSVideoUrl = async (contentIds, formatType = "HQ") => {
531
526
  contentIds = contentIds.replace(/,/g, "|");
532
- return await h5fetch(`https://app.c.nf.migu.cn/strategy/short-video/play/v1.0?contentIds=${contentIds}&formatType=${formatType}`);
527
+ return await h5fetch(`https://app.c.vip.migu.cn/strategy/short-video/play/v1.0?contentIds=${contentIds}&formatType=${formatType}`);
533
528
  };
534
529
 
535
530
  // src/modules/svideo_userContent.ts
@@ -546,7 +541,7 @@ var getVrbtOpNum = async (contentIds) => {
546
541
  var getVrbtUrl = async (contentIds) => {
547
542
  contentIds = contentIds.replace(/,/g, "|");
548
543
  return await h5fetch(
549
- `https://app.c.nf.migu.cn/strategy/vrbt/play/v1.0?contentIds=${contentIds}`,
544
+ `https://app.c.vip.migu.cn/strategy/vrbt/play/v1.0?contentIds=${contentIds}`,
550
545
  {
551
546
  headers: {
552
547
  "channel": "014X031"
@@ -556,12 +551,11 @@ var getVrbtUrl = async (contentIds) => {
556
551
  };
557
552
 
558
553
  // src/modules/lyric.ts
559
- import axios3 from "axios";
560
554
  var getLyric = async (contentId, type = "lrc") => {
561
555
  if (contentId === "") return { error: "contentId is empty!", success: false };
562
556
  const types = type.split(",");
563
557
  if (types.length === 0) return { error: "types is empty!", success: false };
564
- const res = await axios3.get(`https://app.u.nf.migu.cn/MIGUM2.0/v1.0/content/resourceinfo.do?resourceId=${contentId}&resourceType=2`);
558
+ const res = await _fetch(`https://app.u.nf.migu.cn/MIGUM2.0/v1.0/content/resourceinfo.do?resourceId=${contentId}&resourceType=2`);
565
559
  const code = res.data.code.toString() || "";
566
560
  const data = res.data.resource[0] || {};
567
561
  if (code !== "000000") return {
@@ -574,7 +568,7 @@ var getLyric = async (contentId, type = "lrc") => {
574
568
  if (types.includes("lrc")) {
575
569
  lrcUrl = data.lrcUrl || "";
576
570
  if (lrcUrl !== "") {
577
- const lrcRes = await axios3.get(lrcUrl);
571
+ const lrcRes = await _fetch(lrcUrl);
578
572
  if (lrcRes.status === 200) {
579
573
  lrc = lrcRes.data || "";
580
574
  }
@@ -583,7 +577,7 @@ var getLyric = async (contentId, type = "lrc") => {
583
577
  if (types.includes("trc")) {
584
578
  trcUrl = data.trcUrl || "";
585
579
  if (trcUrl !== "") {
586
- const trcRes = await axios3.get(trcUrl);
580
+ const trcRes = await _fetch(trcUrl);
587
581
  if (trcRes.status === 200) {
588
582
  trc = trcRes.data || "";
589
583
  }
@@ -853,10 +847,10 @@ var getConcertRecommendMv = async (concertId) => {
853
847
  return await h5fetch(`https://app.c.nf.migu.cn/v1.0/liveshow/query-mv-detail?concertId=${concertId}`);
854
848
  };
855
849
 
856
- // src/modules/mv_song.ts
850
+ // src/modules/song_mv.ts
857
851
  var getMvBySong = async (songId) => {
858
852
  return await h5fetch(
859
- `https://app.c.nf.migu.cn/MIGUM2.0/strategy/mv-player/video/v1.0?songId=${songId}`,
853
+ `https://app.c.vip.migu.cn/MIGUM2.0/strategy/mv-player/video/v1.0?songId=${songId}`,
860
854
  {
861
855
  headers: {
862
856
  "channel": "0146921"
@@ -1090,7 +1084,7 @@ var getListenRank = async (pacmtoken, type) => {
1090
1084
 
1091
1085
  // src/modules/cloud_url.ts
1092
1086
  var getCloudUrl = async (pacmtoken, contentId, toneFlag = "PQ") => {
1093
- const { data, cookies } = await ckfetch("https://app.c.nf.migu.cn/MIGUM3.0/strategy/cloud/listen-url/v1.0", {
1087
+ const { data, cookies } = await ckfetch("https://app.c.vip.migu.cn/MIGUM3.0/strategy/cloud/listen-url/v1.0", {
1094
1088
  cookie: { pacmtoken },
1095
1089
  headers: { "channel": "0146931", "version": "7.41.13" },
1096
1090
  params: {
@@ -1105,9 +1099,9 @@ var getCloudUrl = async (pacmtoken, contentId, toneFlag = "PQ") => {
1105
1099
  // src/modules/url_dl_v1.ts
1106
1100
  var getDLUrlV1 = async (songId, toneFlag = "PQ") => {
1107
1101
  return await h5fetch(
1108
- `https://app.c.nf.migu.cn/MIGUM2.0/strategy/download-url/by-songid/v1.0`,
1102
+ `https://app.c.vip.migu.cn/MIGUM2.0/strategy/download-url/by-songid/v1.0`,
1109
1103
  {
1110
- headers: { "channel": "0146931", "version": "7.41.13" },
1104
+ headers: { "channel": "0146931", "version": "8.8.0" },
1111
1105
  params: {
1112
1106
  "formatType": toneFlag,
1113
1107
  songId
@@ -1215,23 +1209,30 @@ var getThumbsMsg = async (pacmtoken, page = 1, size = 10) => {
1215
1209
  };
1216
1210
 
1217
1211
  // src/modules/cloud_upload.ts
1218
- import crypto from "crypto";
1212
+ import CryptoJS from "crypto-js";
1219
1213
  function getExt(file) {
1220
1214
  const index = file.name.lastIndexOf(".");
1221
1215
  if (index <= 0) return "";
1222
1216
  return file.name.substring(index + 1).toLowerCase();
1223
1217
  }
1218
+ function toWordArray(bytes) {
1219
+ const words = [];
1220
+ for (let i = 0; i < bytes.length; i++) {
1221
+ words[i >>> 2] = (words[i >>> 2] || 0) | bytes[i] << 24 - i % 4 * 8;
1222
+ }
1223
+ return CryptoJS.lib.WordArray.create(words, bytes.length);
1224
+ }
1224
1225
  async function getHash(file) {
1225
- const hash = crypto.createHash("md5");
1226
+ const hash = CryptoJS.algo.MD5.create();
1226
1227
  const reader = file.stream().getReader();
1227
1228
  while (true) {
1228
1229
  const { done, value } = await reader.read();
1229
1230
  if (done) {
1230
1231
  break;
1231
1232
  }
1232
- hash.update(value);
1233
+ hash.update(toWordArray(value));
1233
1234
  }
1234
- return hash.digest("hex");
1235
+ return hash.finalize().toString(CryptoJS.enc.Hex);
1235
1236
  }
1236
1237
  var getCloudUploadUrl = async (pacmtoken, file) => {
1237
1238
  const ext = getExt(file);
@@ -1254,12 +1255,12 @@ var getCloudUploadUrl = async (pacmtoken, file) => {
1254
1255
  };
1255
1256
 
1256
1257
  // src/modules/comment_delete.ts
1257
- var deleteComment = async (pacmtoken, resourceId) => {
1258
+ var deleteComment = async (pacmtoken, commentId) => {
1258
1259
  const { data, cookies } = await ckfetch(
1259
1260
  `https://app.u.nf.migu.cn/MIGUM2.0/v1.0/user/delComment.do`,
1260
1261
  {
1261
1262
  method: "GET",
1262
- params: { resourceId, hasAudited: "false" },
1263
+ params: { resourceId: commentId, hasAudited: "false" },
1263
1264
  cookie: { pacmtoken },
1264
1265
  headers: {
1265
1266
  "channel": "0146891",
@@ -1282,7 +1283,7 @@ var getSingerMv = async (singerId, page) => {
1282
1283
 
1283
1284
  // src/modules/cloud_dl.ts
1284
1285
  var getCloudDLUrl = async (pacmtoken, contentId, toneFlag = "PQ") => {
1285
- const { data, cookies } = await ckfetch("https://app.c.nf.migu.cn/MIGUM3.0/strategy/cloud/download-url/v1.0", {
1286
+ const { data, cookies } = await ckfetch("https://app.c.vip.migu.cn/MIGUM3.0/strategy/cloud/download-url/v1.0", {
1286
1287
  cookie: { pacmtoken },
1287
1288
  headers: { "channel": "0146931", "version": "7.41.13" },
1288
1289
  params: {
@@ -1361,16 +1362,20 @@ var getSquareTag = async (needMoreTag = true) => {
1361
1362
  return baseTag;
1362
1363
  };
1363
1364
 
1364
- // src/modules/resourceinfo_song.ts
1365
- var getSongInfo = async (contentIds) => {
1365
+ // src/modules/song_info.ts
1366
+ var getSongInfoByContentIds = async (contentIds) => {
1366
1367
  contentIds = contentIds.replace(/,/g, "|");
1367
1368
  return await h5fetch(`https://app.c.nf.migu.cn/resource/song/by-contentids/v2.0?contentId=${contentIds}`);
1368
1369
  };
1370
+ var getSongInfoBySongIds = async (songId) => {
1371
+ songId = songId.replace(/,/g, "|");
1372
+ return await h5fetch(`https://app.c.nf.migu.cn/resource/song/by-songids/v2.0?songId=${songId}`);
1373
+ };
1369
1374
 
1370
1375
  // src/modules/user_ordered.ts
1371
1376
  var getUserOrdered = async (pacmtoken) => {
1372
1377
  if (!pacmtoken) return { data: { success: false, code: "290001", info: "\u8BF7\u5148\u767B\u5F55" }, newPacmToken: void 0 };
1373
- const { data, cookies } = await ckfetch("https://app.c.nf.migu.cn/MIGUM3.0/strategy/song-ordered/v2.0", {
1378
+ const { data, cookies } = await ckfetch("https://app.c.vip.migu.cn/MIGUM3.0/strategy/song-ordered/v2.0", {
1374
1379
  cookie: { pacmtoken },
1375
1380
  headers: { "channel": "014X031" }
1376
1381
  });
@@ -1390,7 +1395,7 @@ var getDAlbumSong = async (dAlbumId) => {
1390
1395
  // src/modules/dalbum_pay.ts
1391
1396
  var getDAlbumPay = async (dAlbumId) => {
1392
1397
  return await h5fetch(
1393
- `https://app.c.nf.migu.cn/MIGUM3.0/strategy/album-sub-rank/v1.0?queryType=01&resourceId=${dAlbumId}`,
1398
+ `https://app.c.vip.migu.cn/MIGUM3.0/strategy/album-sub-rank/v1.0?queryType=01&resourceId=${dAlbumId}`,
1394
1399
  { headers: { "channel": "0146891" } }
1395
1400
  );
1396
1401
  };
@@ -1435,7 +1440,62 @@ var getUserLikeList = async (playlistId, page, size, pacmtoken = "", userId = ""
1435
1440
  });
1436
1441
  return { data, newPacmToken: cookies.pacmtoken || "" };
1437
1442
  };
1443
+
1444
+ // src/modules/comment_epic_add.ts
1445
+ var addEpicComment = async (commentId, pacmtoken) => {
1446
+ const { data, cookies } = await ckfetch(
1447
+ `https://app.c.nf.migu.cn/user/api/comment/add-recommend/v1.0`,
1448
+ {
1449
+ method: "POST",
1450
+ body: JSON.stringify({ commentId }),
1451
+ cookie: { pacmtoken },
1452
+ headers: {
1453
+ "channel": "0146891",
1454
+ "Content-Type": "application/json"
1455
+ }
1456
+ }
1457
+ );
1458
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1459
+ };
1460
+
1461
+ // src/modules/comment_epic_del.ts
1462
+ var deleteEpicComment = async (commentId, pacmtoken) => {
1463
+ const { data, cookies } = await ckfetch(
1464
+ `https://app.c.nf.migu.cn/user/api/comment/cancel-recommend/v1.0`,
1465
+ {
1466
+ method: "POST",
1467
+ body: JSON.stringify({ commentId }),
1468
+ cookie: { pacmtoken },
1469
+ headers: {
1470
+ "channel": "0146891",
1471
+ "Content-Type": "application/json"
1472
+ }
1473
+ }
1474
+ );
1475
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1476
+ };
1477
+
1478
+ // src/modules/song_ids.ts
1479
+ var getSongIds = async (songId, channel = "014X031") => {
1480
+ const res = await h5fetch(
1481
+ `https://app.c.vip.migu.cn/strategy/song-purchase/status/v1.0`,
1482
+ {
1483
+ params: { songId },
1484
+ headers: {
1485
+ "ua": "Android_migu",
1486
+ channel
1487
+ }
1488
+ }
1489
+ );
1490
+ let actionUrl = res.data.actionUrl;
1491
+ if (!actionUrl)
1492
+ return res;
1493
+ actionUrl = actionUrl.split("?")[1].split("&").map((item) => item.split("="));
1494
+ res.data = { ...res.data, ...Object.fromEntries(actionUrl) };
1495
+ return res;
1496
+ };
1438
1497
  export {
1498
+ addEpicComment,
1439
1499
  addFollower,
1440
1500
  addSongToMyList,
1441
1501
  addUserCollect,
@@ -1444,6 +1504,7 @@ export {
1444
1504
  checkToken,
1445
1505
  deleteCloudMusic,
1446
1506
  deleteComment,
1507
+ deleteEpicComment,
1447
1508
  dislikeSong,
1448
1509
  editUserMyList,
1449
1510
  emojiAction,
@@ -1512,7 +1573,9 @@ export {
1512
1573
  getSingerMv,
1513
1574
  getSingerSimilar,
1514
1575
  getSingerSong,
1515
- getSongInfo,
1576
+ getSongIds,
1577
+ getSongInfoByContentIds,
1578
+ getSongInfoBySongIds,
1516
1579
  getSquareListByTag,
1517
1580
  getSquarePage,
1518
1581
  getSquareRecommend,
@@ -1549,15 +1612,16 @@ export {
1549
1612
  removeUserMyList,
1550
1613
  searchAlbum,
1551
1614
  searchConcert,
1615
+ searchCrbt,
1552
1616
  searchLrc,
1553
1617
  searchMv,
1554
1618
  searchPlaylist,
1555
- searchRbt,
1556
1619
  searchSVideo,
1557
1620
  searchSinger,
1558
1621
  searchSong,
1559
1622
  searchSuggest,
1560
1623
  searchTicket,
1624
+ searchVrbt,
1561
1625
  shareCommon,
1562
1626
  shareVideo
1563
1627
  };