@rexnow/netease-music 0.1.0 → 0.2.0

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.
@@ -9,35 +9,35 @@ function t(e) {
9
9
  function i(e) {
10
10
  return e.replace(/\\(["\\])/g, "$1").trim();
11
11
  }
12
- function r(e) {
12
+ function l(e) {
13
13
  return Object.entries(e).filter(([e, t])=>!!(e && t)).map(([e, t])=>`${e}=${t}`).join("; ");
14
14
  }
15
- function l(e) {
16
- let l = (e || "").trim();
17
- if (!l) return {
15
+ function r(e) {
16
+ let r = (e || "").trim();
17
+ if (!r) return {
18
18
  cookieHeader: "",
19
19
  cookies: {},
20
20
  hasMusicU: !1
21
21
  };
22
- let n = l;
23
- /(?:^|\s)(?:curl\s+\^"|(?:-H|--header|-b|--cookie)\s+\^")/i.test(n) && (n = n.replace(/\^\r?\n/g, " ").replace(/\^([\s\S])/g, "$1"));
24
- let a = "", o = /(?:^|[\s\\])(?:-b|--cookie)\s+'((?:[^']|'\\'')*)'/.exec(n);
25
- if ((null == o ? void 0 : o[1]) && (a = t(o[1])), !a) {
26
- let e = /(?:^|[\s\\])(?:-b|--cookie)\s+"((?:[^"\\]|\\.)*)"/.exec(n);
27
- (null == e ? void 0 : e[1]) && (a = i(e[1]));
22
+ let a = r;
23
+ /(?:^|\s)(?:curl\s+\^"|(?:-H|--header|-b|--cookie)\s+\^")/i.test(a) && (a = a.replace(/\^\r?\n/g, " ").replace(/\^([\s\S])/g, "$1"));
24
+ let n = "", o = /(?:^|[\s\\])(?:-b|--cookie)\s+'((?:[^']|'\\'')*)'/.exec(a);
25
+ if ((null == o ? void 0 : o[1]) && (n = t(o[1])), !n) {
26
+ let e = /(?:^|[\s\\])(?:-b|--cookie)\s+"((?:[^"\\]|\\.)*)"/.exec(a);
27
+ (null == e ? void 0 : e[1]) && (n = i(e[1]));
28
28
  }
29
- if (a || (a = function(e, r) {
30
- let l = r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), n = RegExp(`(?:^|[\\s\\\\])(?:-H|--header)\\s+'${l}:\\s*((?:[^']|'\\\\'')*)'`, "i").exec(e);
31
- if (null == n ? void 0 : n[1]) return t(n[1]);
32
- let a = RegExp(`(?:^|[\\s\\\\])(?:-H|--header)\\s+"${l}:\\s*((?:[^"\\\\]|\\\\.)*)"`, "i").exec(e);
33
- if (null == a ? void 0 : a[1]) return i(a[1]);
34
- let o = RegExp(`"${l}"\\s*:\\s*"((?:[^"\\\\]|\\\\.)*)"`, "i").exec(e);
29
+ if (n || (n = function(e, l) {
30
+ let r = l.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), a = RegExp(`(?:^|[\\s\\\\])(?:-H|--header)\\s+'${r}:\\s*((?:[^']|'\\\\'')*)'`, "i").exec(e);
31
+ if (null == a ? void 0 : a[1]) return t(a[1]);
32
+ let n = RegExp(`(?:^|[\\s\\\\])(?:-H|--header)\\s+"${r}:\\s*((?:[^"\\\\]|\\\\.)*)"`, "i").exec(e);
33
+ if (null == n ? void 0 : n[1]) return i(n[1]);
34
+ let o = RegExp(`"${r}"\\s*:\\s*"((?:[^"\\\\]|\\\\.)*)"`, "i").exec(e);
35
35
  if (null == o ? void 0 : o[1]) return i(o[1]);
36
- let s = RegExp(`^\\s*${l}:\\s*(.+)$`, "im").exec(e);
36
+ let s = RegExp(`^\\s*${r}:\\s*(.+)$`, "im").exec(e);
37
37
  return (null == s ? void 0 : s[1]) ? s[1].trim() : "";
38
- }(n, "cookie")), !a && !/^\s*(?:curl\s+|fetch\s*\()/i.test(n)) {
39
- let e = n.replace(/\r?\n+/g, "; ").trim();
40
- a = !e.includes("=") && !e.includes(";") && /^[A-Za-z0-9._-]{32,}$/.test(e) ? `MUSIC_U=${e}` : e;
38
+ }(a, "cookie")), !n && !/^\s*(?:curl\s+|fetch\s*\()/i.test(a)) {
39
+ let e = a.replace(/\r?\n+/g, "; ").trim();
40
+ n = !e.includes("=") && !e.includes(";") && /^[A-Za-z0-9._-]{32,}$/.test(e) ? `MUSIC_U=${e}` : e;
41
41
  }
42
42
  let s = function(e) {
43
43
  let t = {};
@@ -45,101 +45,147 @@ function l(e) {
45
45
  for (let i of e.split(";")){
46
46
  let e = i.indexOf("=");
47
47
  if (e <= 0) continue;
48
- let r = i.slice(0, e).trim(), l = i.slice(e + 1).trim();
49
- !r || !l || /[\r\n]/.test(r) || /[\r\n]/.test(l) || (t[r] = l);
48
+ let l = i.slice(0, e).trim(), r = i.slice(e + 1).trim();
49
+ !l || !r || /[\r\n]/.test(l) || /[\r\n]/.test(r) || (t[l] = r);
50
50
  }
51
51
  return t;
52
- }(a);
52
+ }(n);
53
53
  return {
54
- cookieHeader: r(s),
54
+ cookieHeader: l(s),
55
55
  cookies: s,
56
56
  hasMusicU: !!s.MUSIC_U
57
57
  };
58
58
  }
59
- function n(t, i = Date.now()) {
60
- let r = {}, l = [];
59
+ function a(t, i = Date.now()) {
60
+ let l = {}, r = [];
61
61
  if (!t) return {
62
- updates: r,
63
- deletes: l
62
+ updates: l,
63
+ deletes: r
64
64
  };
65
- let a = "";
66
- for (let [e, i] of Object.entries(t))"set-cookie" === e.toLowerCase() && "string" == typeof i && (a = a ? `${a}, ${i}` : i);
67
- if (!a) return {
68
- updates: r,
69
- deletes: l
65
+ let n = "";
66
+ for (let [e, i] of Object.entries(t))"set-cookie" === e.toLowerCase() && "string" == typeof i && (n = n ? `${n}, ${i}` : i);
67
+ if (!n) return {
68
+ updates: l,
69
+ deletes: r
70
70
  };
71
71
  for (let t of function(e) {
72
72
  if (!e) return [];
73
- let t = [], i = 0, r = !1;
74
- for(let l = 0; l < e.length; l++){
75
- let n = e[l];
76
- if (";" === n) {
77
- let t = e.slice(l + 1).trimStart();
78
- r = /^expires\s*=/i.test(t);
79
- } else if ("," === n) {
80
- if (r) {
81
- r = !1;
73
+ let t = [], i = 0, l = !1;
74
+ for(let r = 0; r < e.length; r++){
75
+ let a = e[r];
76
+ if (";" === a) {
77
+ let t = e.slice(r + 1).trimStart();
78
+ l = /^expires\s*=/i.test(t);
79
+ } else if ("," === a) {
80
+ if (l) {
81
+ l = !1;
82
82
  continue;
83
83
  }
84
- let n = e.slice(i, l).trim();
85
- n && t.push(n), i = l + 1;
84
+ let a = e.slice(i, r).trim();
85
+ a && t.push(a), i = r + 1;
86
86
  }
87
87
  }
88
- let l = e.slice(i).trim();
89
- return l && t.push(l), t;
90
- }(a)){
88
+ let r = e.slice(i).trim();
89
+ return r && t.push(r), t;
90
+ }(n)){
91
91
  var o;
92
- let n = t.split(";"), a = (null == (o = n[0]) ? void 0 : o.trim()) || "", s = a.indexOf("=");
92
+ let a = t.split(";"), n = (null == (o = a[0]) ? void 0 : o.trim()) || "", s = n.indexOf("=");
93
93
  if (s <= 0) continue;
94
- let u = a.slice(0, s).trim();
94
+ let u = n.slice(0, s).trim();
95
95
  if (!e.includes(u)) continue;
96
- let d = a.slice(s + 1).trim(), c = !d;
97
- for (let e of n.slice(1)){
98
- let t = e.trim(), r = /^max-age\s*=\s*(-?\d+)$/i.exec(t);
99
- (null == r ? void 0 : r[1]) && 0 >= Number(r[1]) && (c = !0);
100
- let l = /^expires\s*=\s*(.+)$/i.exec(t);
101
- if (null == l ? void 0 : l[1]) {
102
- let e = Date.parse(l[1]);
96
+ let d = n.slice(s + 1).trim(), c = !d;
97
+ for (let e of a.slice(1)){
98
+ let t = e.trim(), l = /^max-age\s*=\s*(-?\d+)$/i.exec(t);
99
+ (null == l ? void 0 : l[1]) && 0 >= Number(l[1]) && (c = !0);
100
+ let r = /^expires\s*=\s*(.+)$/i.exec(t);
101
+ if (null == r ? void 0 : r[1]) {
102
+ let e = Date.parse(r[1]);
103
103
  Number.isFinite(e) && e <= i && (c = !0);
104
104
  }
105
105
  }
106
- if (c) delete r[u], l.includes(u) || l.push(u);
106
+ if (c) delete l[u], r.includes(u) || r.push(u);
107
107
  else {
108
- r[u] = d;
109
- let e = l.indexOf(u);
110
- e >= 0 && l.splice(e, 1);
108
+ l[u] = d;
109
+ let e = r.indexOf(u);
110
+ e >= 0 && r.splice(e, 1);
111
111
  }
112
112
  }
113
113
  return {
114
- updates: r,
115
- deletes: l
114
+ updates: l,
115
+ deletes: r
116
116
  };
117
117
  }
118
- let a = "https://music.163.com", o = "e82ckenh8dichen8", s = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36", u = {
118
+ let n = "https://music.163.com", o = "e82ckenh8dichen8", s = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36", u = {
119
119
  osver: "Microsoft-Windows-10-Professional-build-19045-64bit",
120
120
  os: "pc",
121
- appver: "3.1.17.204416",
121
+ appver: "3.1.29.205117",
122
122
  versioncode: "140",
123
123
  resolution: "1920x1080",
124
124
  channel: "netease"
125
- }, d = `Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36 Chrome/91.0.4472.164 NeteaseMusicDesktop/${u.appver}`, c = {
125
+ }, d = {
126
+ osver: "14",
127
+ os: "android",
128
+ appver: "9.5.61",
129
+ versioncode: "9005061",
130
+ resolution: "1080x2400",
131
+ channel: "xiaomi"
132
+ }, c = `Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36 Chrome/91.0.4472.164 NeteaseMusicDesktop/${u.appver}`, p = [
133
+ "standard",
134
+ "higher",
135
+ "exhigh",
136
+ "lossless",
137
+ "hires",
138
+ "jyeffect",
139
+ "sky",
140
+ "dolby",
141
+ "vivid",
142
+ "jymaster"
143
+ ], f = {
126
144
  standard: 128000,
127
145
  higher: 192000,
128
146
  exhigh: 320000,
129
147
  lossless: 999000,
130
- hires: 999000
131
- }, p = {
148
+ hires: 999000,
149
+ jyeffect: 999000,
150
+ sky: 999000,
151
+ dolby: 999000,
152
+ vivid: 999000,
153
+ jymaster: 999000
154
+ };
155
+ function m(e) {
156
+ return "lossless" === e || "hires" === e || "jyeffect" === e || "sky" === e || "dolby" === e || "jymaster" === e;
157
+ }
158
+ let y = {
132
159
  ALL: 0,
133
160
  ZH: 7,
134
161
  EA: 96,
135
162
  KR: 16,
136
163
  JP: 8
137
- }, f = {
164
+ }, g = {
165
+ ALL: -1,
166
+ ZH: 7,
167
+ EA: 96,
168
+ JP: 8,
169
+ KR: 16,
170
+ OTHER: 0
171
+ }, v = {
172
+ ALL: -1,
173
+ MALE: 1,
174
+ FEMALE: 2,
175
+ BAND: 3
176
+ }, h = {
177
+ ZH: 1,
178
+ EA: 2,
179
+ KR: 3,
180
+ JP: 4
181
+ }, b = {
138
182
  songs: 1,
139
183
  albums: 10,
140
184
  artists: 100,
141
- playlists: 1000
142
- }, m = [
185
+ playlists: 1000,
186
+ lyrics: 1006,
187
+ dj: 1009
188
+ }, k = [
143
189
  {
144
190
  id: "华语",
145
191
  title: "华语",
@@ -260,14 +306,80 @@ let a = "https://music.163.com", o = "e82ckenh8dichen8", s = "Mozilla/5.0 (Macin
260
306
  title: "驾车",
261
307
  subtitle: "场景"
262
308
  }
263
- ], y = "ncm:song:", g = "ncm:album:", h = "ncm:playlist:", v = "ncm:genre:", b = "ncm:radio:";
264
- function k(e) {
265
- return `${b}${e}`;
309
+ ], A = "ncm:song:", P = "ncm:album:", S = "ncm:playlist:", C = "ncm:dj:", I = "ncm:hot:", U = "ncm:genre:", w = "ncm:radio:";
310
+ function O(e) {
311
+ return `${A}${e}`;
312
+ }
313
+ function M(e) {
314
+ return `${I}${encodeURIComponent(e.trim())}`;
315
+ }
316
+ function T(e) {
317
+ return `${U}${e}`;
266
318
  }
267
- function P(e) {
319
+ function j(e) {
320
+ return `${w}${e}`;
321
+ }
322
+ function $(e) {
268
323
  return /^\d{1,20}$/.test(e);
269
324
  }
270
- function A(e) {
325
+ function E(e) {
326
+ let t = (e || "").trim();
327
+ if (!t) return null;
328
+ if (t.startsWith(A)) {
329
+ let e = t.slice(A.length).trim();
330
+ return $(e) ? {
331
+ kind: "song",
332
+ id: e
333
+ } : null;
334
+ }
335
+ if (t.startsWith(P)) {
336
+ let e = t.slice(P.length).trim();
337
+ return $(e) ? {
338
+ kind: "album",
339
+ id: e
340
+ } : null;
341
+ }
342
+ if (t.startsWith(S)) {
343
+ let e = t.slice(S.length).trim();
344
+ return $(e) ? {
345
+ kind: "playlist",
346
+ id: e
347
+ } : null;
348
+ }
349
+ if (t.startsWith(C)) {
350
+ let e = t.slice(C.length).trim();
351
+ return $(e) ? {
352
+ kind: "dj",
353
+ id: e
354
+ } : null;
355
+ }
356
+ if (t.startsWith(I)) {
357
+ let e = t.slice(I.length).trim();
358
+ if (!e) return null;
359
+ try {
360
+ let t = decodeURIComponent(e).trim();
361
+ return t ? {
362
+ kind: "hot",
363
+ keyword: t
364
+ } : null;
365
+ } catch (t) {
366
+ return {
367
+ kind: "hot",
368
+ keyword: e
369
+ };
370
+ }
371
+ }
372
+ let i = /music\.163\.com\/(?:#\/)?(song|album|playlist|djradio|radio)\?[^#]*\bid=(\d{1,20})\b/i.exec(t);
373
+ if ((null == i ? void 0 : i[1]) && i[2]) {
374
+ let e = i[1].toLowerCase();
375
+ return {
376
+ kind: "djradio" === e || "radio" === e ? "dj" : e,
377
+ id: i[2]
378
+ };
379
+ }
380
+ return null;
381
+ }
382
+ function N(e) {
271
383
  if ("string" != typeof e) return;
272
384
  let t = e.trim();
273
385
  if (t) {
@@ -275,26 +387,26 @@ function A(e) {
275
387
  if (t.startsWith("http://")) return `https://${t.slice(7)}`;
276
388
  }
277
389
  }
278
- function C(e, t = 500) {
279
- let i = A(e);
390
+ function R(e, t = 500) {
391
+ let i = N(e);
280
392
  if (!i) return;
281
393
  if (!/^https:\/\/p\d+\.music\.126\.net\//i.test(i) || /[?&]param=/i.test(i)) return i;
282
- let r = i.includes("?") ? "&" : "?";
283
- return `${i}${r}param=${t}y${t}`;
394
+ let l = i.includes("?") ? "&" : "?";
395
+ return `${i}${l}param=${t}y${t}`;
284
396
  }
285
- function w(e) {
397
+ function D(e) {
286
398
  let t = [];
287
399
  for(let i = 0; i < e.length; i++){
288
- let r = e.charCodeAt(i);
289
- if (r >= 0xd800 && r <= 0xdbff && i + 1 < e.length) {
400
+ let l = e.charCodeAt(i);
401
+ if (l >= 0xd800 && l <= 0xdbff && i + 1 < e.length) {
290
402
  let t = e.charCodeAt(i + 1);
291
- t >= 0xdc00 && t <= 0xdfff && (r = 0x10000 + (r - 0xd800 << 10) + (t - 0xdc00), i++);
403
+ t >= 0xdc00 && t <= 0xdfff && (l = 0x10000 + (l - 0xd800 << 10) + (t - 0xdc00), i++);
292
404
  }
293
- r < 0x80 ? t.push(r) : r < 0x800 ? t.push(0xc0 | r >> 6, 0x80 | 0x3f & r) : r < 0x10000 ? t.push(0xe0 | r >> 12, 0x80 | r >> 6 & 0x3f, 0x80 | 0x3f & r) : t.push(0xf0 | r >> 18, 0x80 | r >> 12 & 0x3f, 0x80 | r >> 6 & 0x3f, 0x80 | 0x3f & r);
405
+ l < 0x80 ? t.push(l) : l < 0x800 ? t.push(0xc0 | l >> 6, 0x80 | 0x3f & l) : l < 0x10000 ? t.push(0xe0 | l >> 12, 0x80 | l >> 6 & 0x3f, 0x80 | 0x3f & l) : t.push(0xf0 | l >> 18, 0x80 | l >> 12 & 0x3f, 0x80 | l >> 6 & 0x3f, 0x80 | 0x3f & l);
294
406
  }
295
407
  return new Uint8Array(t);
296
408
  }
297
- let S = [
409
+ let L = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", _ = [
298
410
  7,
299
411
  12,
300
412
  17,
@@ -359,15 +471,15 @@ let S = [
359
471
  10,
360
472
  15,
361
473
  21
362
- ], O = Array.from({
474
+ ], W = Array.from({
363
475
  length: 64
364
476
  }, (e, t)=>Math.floor(0x100000000 * Math.abs(Math.sin(t + 1))) >>> 0);
365
- function U(e) {
477
+ function V(e) {
366
478
  let t = "";
367
479
  for(let i = 0; i < 4; i++)t += (e >>> 8 * i & 0xff).toString(16).padStart(2, "0");
368
480
  return t;
369
481
  }
370
- let I = new Uint8Array([
482
+ let x = new Uint8Array([
371
483
  0x63,
372
484
  0x7c,
373
485
  0x77,
@@ -624,7 +736,7 @@ let I = new Uint8Array([
624
736
  0x54,
625
737
  0xbb,
626
738
  0x16
627
- ]), M = [
739
+ ]), H = [
628
740
  0x01,
629
741
  0x02,
630
742
  0x04,
@@ -636,27 +748,27 @@ let I = new Uint8Array([
636
748
  0x1b,
637
749
  0x36
638
750
  ];
639
- function T(e) {
751
+ function F(e) {
640
752
  return (e << 1 ^ (0x80 & e ? 0x1b : 0)) & 0xff;
641
753
  }
642
- function $(e) {
754
+ function q(e) {
643
755
  for(var t = 1; t < arguments.length; t++){
644
- var i = null != arguments[t] ? arguments[t] : {}, r = Object.keys(i);
645
- "function" == typeof Object.getOwnPropertySymbols && (r = r.concat(Object.getOwnPropertySymbols(i).filter(function(e) {
756
+ var i = null != arguments[t] ? arguments[t] : {}, l = Object.keys(i);
757
+ "function" == typeof Object.getOwnPropertySymbols && (l = l.concat(Object.getOwnPropertySymbols(i).filter(function(e) {
646
758
  return Object.getOwnPropertyDescriptor(i, e).enumerable;
647
- }))), r.forEach(function(t) {
648
- var r;
649
- r = i[t], t in e ? Object.defineProperty(e, t, {
650
- value: r,
759
+ }))), l.forEach(function(t) {
760
+ var l;
761
+ l = i[t], t in e ? Object.defineProperty(e, t, {
762
+ value: l,
651
763
  enumerable: !0,
652
764
  configurable: !0,
653
765
  writable: !0
654
- }) : e[t] = r;
766
+ }) : e[t] = l;
655
767
  });
656
768
  }
657
769
  return e;
658
770
  }
659
- function j(e, t) {
771
+ function B(e, t) {
660
772
  return t = null != t ? t : {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : (function(e) {
661
773
  var t = Object.keys(e);
662
774
  if (Object.getOwnPropertySymbols) {
@@ -668,107 +780,113 @@ function j(e, t) {
668
780
  Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(t, i));
669
781
  }), e;
670
782
  }
671
- function D(e) {
783
+ function z(e) {
672
784
  return null !== e && "object" == typeof e && !Array.isArray(e);
673
785
  }
674
- function N(e) {
786
+ function J(e) {
675
787
  return "string" == typeof e ? /^\d+$/.test(e.trim()) ? e.trim() : "" : "number" == typeof e && Number.isFinite(e) && e > 0 ? String(Math.floor(e)) : "";
676
788
  }
677
- function R(e) {
789
+ function G(e) {
678
790
  return "string" == typeof e ? e.trim() : "";
679
791
  }
680
- function L(e) {
792
+ function K(e) {
681
793
  let t = Number(e);
682
794
  return Number.isFinite(t) ? t : 0;
683
795
  }
684
- function E(e) {
796
+ function Z(e) {
685
797
  if (!Number.isFinite(e) || e <= 0) return "";
686
- let t = Math.round(e), i = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), l = t % 60;
687
- return i > 0 ? `${i}:${String(r).padStart(2, "0")}:${String(l).padStart(2, "0")}` : `${r}:${String(l).padStart(2, "0")}`;
798
+ let t = Math.round(e), i = Math.floor(t / 3600), l = Math.floor(t % 3600 / 60), r = t % 60;
799
+ return i > 0 ? `${i}:${String(l).padStart(2, "0")}:${String(r).padStart(2, "0")}` : `${l}:${String(r).padStart(2, "0")}`;
688
800
  }
689
- function W(e) {
690
- if (!D(e)) return null;
691
- let t = N(e.id), i = R(e.name);
801
+ function X(e) {
802
+ if (!z(e)) return null;
803
+ let t = J(e.id), i = G(e.name);
692
804
  if (!i) return null;
693
- let r = C(R(e.img1v1Url) || R(e.picUrl) || R(e.avatarUrl)), l = Array.isArray(e.alias) ? e.alias.map(R).filter(Boolean) : [], n = R(e.trans) || l[0] || void 0;
694
- return $({
805
+ let l = R(G(e.img1v1Url) || G(e.picUrl) || G(e.avatarUrl)), r = Array.isArray(e.alias) ? e.alias.map(G).filter(Boolean) : [], a = G(e.trans) || r[0] || void 0;
806
+ return q({
695
807
  id: t,
696
808
  name: i
697
- }, r ? {
698
- imageUrl: r
699
- } : {}, n ? {
700
- subtitle: n
809
+ }, l ? {
810
+ imageUrl: l
811
+ } : {}, a ? {
812
+ subtitle: a
701
813
  } : {});
702
814
  }
703
- function _(e) {
704
- if (!D(e)) return null;
705
- let t = N(e.id), i = R(e.name);
815
+ function Q(e) {
816
+ if (!z(e)) return null;
817
+ let t = J(e.id), i = G(e.name);
706
818
  if (!t || !i) return null;
707
- let r = (Array.isArray(e.artists) ? e.artists : e.artist ? [
819
+ let l = (Array.isArray(e.artists) ? e.artists : e.artist ? [
708
820
  e.artist
709
- ] : []).map(W).filter((e)=>null !== e), l = C(R(e.picUrl) || R(e.blurPicUrl)), n = function(e) {
710
- let t = L(e);
821
+ ] : []).map(X).filter((e)=>null !== e), r = R(G(e.picUrl) || G(e.blurPicUrl)), a = function(e) {
822
+ let t = K(e);
711
823
  if (t <= 0) return;
712
824
  let i = new Date(t);
713
825
  if (Number.isNaN(i.getTime())) return;
714
- let r = i.getUTCFullYear(), l = String(i.getUTCMonth() + 1).padStart(2, "0"), n = String(i.getUTCDate()).padStart(2, "0");
715
- return `${r}-${l}-${n}`;
716
- }(e.publishTime), a = R(e.description) || void 0, o = L(e.size) || void 0;
717
- return $({
826
+ let l = i.getUTCFullYear(), r = String(i.getUTCMonth() + 1).padStart(2, "0"), a = String(i.getUTCDate()).padStart(2, "0");
827
+ return `${l}-${r}-${a}`;
828
+ }(e.publishTime), n = G(e.description) || void 0, o = K(e.size) || void 0, s = G(e.company) || void 0, u = G(e.subType) || void 0;
829
+ return q({
718
830
  id: t,
719
831
  name: i,
720
- artists: r
721
- }, l ? {
722
- imageUrl: l
723
- } : {}, n ? {
724
- released: n
832
+ artists: l
833
+ }, r ? {
834
+ imageUrl: r
725
835
  } : {}, a ? {
726
- description: a
836
+ released: a
837
+ } : {}, n ? {
838
+ description: n
727
839
  } : {}, o ? {
728
840
  trackCount: o
841
+ } : {}, s ? {
842
+ company: s
843
+ } : {}, u ? {
844
+ subType: u
729
845
  } : {});
730
846
  }
731
- function x(e) {
732
- if (!D(e)) return null;
733
- let t = N(e.id), i = R(e.name);
847
+ function Y(e) {
848
+ if (!z(e)) return null;
849
+ let t = J(e.id), i = G(e.name);
734
850
  if (!t || !i) return null;
735
- let r = C(R(e.coverImgUrl) || R(e.picUrl)), l = D(e.creator) ? e.creator : void 0, n = R(null == l ? void 0 : l.nickname) || R(e.copywriter) || void 0, a = L(e.trackCount) || void 0, o = [], s = R(e.updateFrequency);
736
- s && o.push(s);
737
- let u = R(e.description);
738
- if (u && o.push(u), Array.isArray(e.tracks) && e.tracks.length) {
851
+ let l = R(G(e.coverImgUrl) || G(e.picUrl)), r = z(e.creator) ? e.creator : void 0, a = G(null == r ? void 0 : r.nickname) || G(e.copywriter) || void 0, n = K(e.trackCount) || void 0, o = Array.isArray(e.tags) ? e.tags.map(G).filter((e)=>!!e) : void 0, s = [], u = G(e.updateFrequency);
852
+ u && s.push(u);
853
+ let d = G(e.description);
854
+ if (d && s.push(d), Array.isArray(e.tracks) && e.tracks.length) {
739
855
  let t = e.tracks.slice(0, 3).map((e, t)=>{
740
- if (!D(e)) return "";
741
- let i = R(e.first), r = R(e.second);
742
- return i ? r ? `${t + 1}. ${i} · ${r}` : `${t + 1}. ${i}` : "";
856
+ if (!z(e)) return "";
857
+ let i = G(e.first), l = G(e.second);
858
+ return i ? l ? `${t + 1}. ${i} · ${l}` : `${t + 1}. ${i}` : "";
743
859
  }).filter(Boolean);
744
- t.length && o.push(t.join("\n"));
860
+ t.length && s.push(t.join("\n"));
745
861
  }
746
- let d = o.filter(Boolean).join("\n") || void 0;
747
- return $({
862
+ let c = s.filter(Boolean).join("\n") || void 0;
863
+ return q({
748
864
  id: t,
749
865
  name: i
750
- }, r ? {
751
- imageUrl: r
752
- } : {}, n ? {
753
- owner: n
754
- } : {}, d ? {
755
- description: d
866
+ }, l ? {
867
+ imageUrl: l
756
868
  } : {}, a ? {
757
- trackCount: a
869
+ owner: a
870
+ } : {}, c ? {
871
+ description: c
872
+ } : {}, n ? {
873
+ trackCount: n
874
+ } : {}, (null == o ? void 0 : o.length) ? {
875
+ tags: o
758
876
  } : {});
759
877
  }
760
- function V(e) {
761
- if (!D(e)) return null;
762
- let t = D(e.song) ? e.song : e, i = N(t.id) || N(e.id), r = R(t.name) || R(e.name);
763
- if (!i || !r) return null;
764
- let l = (Array.isArray(t.ar) ? t.ar : Array.isArray(t.artists) ? t.artists : Array.isArray(e.ar) ? e.ar : []).map(W).filter((e)=>null !== e), n = D(t.al) ? t.al : D(t.album) ? t.album : void 0, a = N(null == n ? void 0 : n.id), o = R(null == n ? void 0 : n.name), s = C(R(null == n ? void 0 : n.picUrl) || R(e.picUrl)), u = L(t.dt) || L(t.duration), d = u > 0 ? Math.round(u / 1000) : 0, c = L(t.fee);
765
- return $(j($({
878
+ function ee(e) {
879
+ if (!z(e)) return null;
880
+ let t = z(e.song) ? e.song : e, i = J(t.id) || J(e.id), l = G(t.name) || G(e.name);
881
+ if (!i || !l) return null;
882
+ let r = (Array.isArray(t.ar) ? t.ar : Array.isArray(t.artists) ? t.artists : Array.isArray(e.ar) ? e.ar : []).map(X).filter((e)=>null !== e), a = z(t.al) ? t.al : z(t.album) ? t.album : void 0, n = J(null == a ? void 0 : a.id), o = G(null == a ? void 0 : a.name), s = R(G(null == a ? void 0 : a.picUrl) || G(e.picUrl)), u = K(t.dt) || K(t.duration), d = u > 0 ? Math.round(u / 1000) : 0, c = K(t.fee), p = K(t.mv) || K(t.mvid) || K(e.mv) || void 0;
883
+ return q(B(q({
766
884
  id: i,
767
- name: r,
768
- artists: l
769
- }, o || a ? {
885
+ name: l,
886
+ artists: r
887
+ }, o || n ? {
770
888
  album: {
771
- id: a,
889
+ id: n,
772
890
  name: o,
773
891
  imageUrl: s
774
892
  }
@@ -778,49 +896,118 @@ function V(e) {
778
896
  imageUrl: s
779
897
  } : {}, c ? {
780
898
  fee: c
899
+ } : {}, p && p > 0 ? {
900
+ mvId: p
781
901
  } : {});
782
902
  }
783
- function F(e) {
903
+ function et(e) {
904
+ if (!z(e)) return null;
905
+ let t = J(e.id), i = G(e.name);
906
+ if (!t || !i) return null;
907
+ let l = R(G(e.picUrl) || G(e.intervenePicUrl)), r = z(e.dj) ? e.dj : void 0, a = G(null == r ? void 0 : r.nickname) || G(e.rcmdtext) || G(e.rcmdText) || void 0, n = G(e.category) || void 0, o = G(e.desc) || G(e.rcmdText) || G(e.rcmdtext) || void 0, s = K(e.programCount) || void 0;
908
+ return q({
909
+ id: t,
910
+ name: i
911
+ }, l ? {
912
+ imageUrl: l
913
+ } : {}, a ? {
914
+ host: a
915
+ } : {}, n ? {
916
+ category: n
917
+ } : {}, o ? {
918
+ description: o
919
+ } : {}, s ? {
920
+ programCount: s
921
+ } : {});
922
+ }
923
+ function ei(e) {
924
+ if (!z(e)) return null;
925
+ let t = z(e.mainSong) ? e.mainSong : void 0, i = J(null == t ? void 0 : t.id) || J(e.mainTrackId), l = J(e.id) || i, r = G(e.name) || G(null == t ? void 0 : t.name);
926
+ if (!i || !r) return null;
927
+ let a = R(G(e.coverUrl) || G(e.blurCoverUrl)), n = z(e.dj) ? e.dj : void 0, o = z(e.radio) ? e.radio : void 0, s = G(null == n ? void 0 : n.nickname) || void 0, u = G(null == o ? void 0 : o.name) || void 0, d = K(e.duration) || K(null == t ? void 0 : t.duration), c = d > 0 ? Math.round(d / 1000) : 0, p = G(e.description) || void 0;
928
+ return q(B(q({
929
+ id: l,
930
+ mainSongId: i,
931
+ name: r
932
+ }, a ? {
933
+ imageUrl: a
934
+ } : {}, s ? {
935
+ host: s
936
+ } : {}, u ? {
937
+ radioName: u
938
+ } : {}), {
939
+ duration: c
940
+ }), p ? {
941
+ description: p
942
+ } : {});
943
+ }
944
+ function el(e) {
945
+ if (!z(e)) return null;
946
+ let t = J(e.tagId), i = G(e.tagName);
947
+ if (!t || !i) return null;
948
+ let l = G(e.enName) || void 0, r = R(G(e.picUrl));
949
+ return q({
950
+ tagId: t,
951
+ tagName: i
952
+ }, l ? {
953
+ enName: l
954
+ } : {}, r ? {
955
+ imageUrl: r
956
+ } : {});
957
+ }
958
+ function er(e) {
959
+ if (!(null == e ? void 0 : e.length)) return;
960
+ let t = new Set(), i = [];
961
+ for (let l of e){
962
+ let e = l.trim();
963
+ !e || t.has(e) || (t.add(e), i.push({
964
+ id: T(e),
965
+ title: e
966
+ }));
967
+ }
968
+ return i.length ? i : void 0;
969
+ }
970
+ function ea(e) {
784
971
  let t = new Set(), i = [];
785
- for (let r of e)!r.id || !r.name || t.has(r.id) || (t.add(r.id), i.push(j($({
786
- id: r.id,
787
- title: r.name
788
- }, r.imageUrl ? {
789
- avatar: r.imageUrl
972
+ for (let l of e)!l.id || !l.name || t.has(l.id) || (t.add(l.id), i.push(B(q({
973
+ id: l.id,
974
+ title: l.name
975
+ }, l.imageUrl ? {
976
+ avatar: l.imageUrl
790
977
  } : {}), {
791
978
  role: Widget.i18n("歌手")
792
979
  })));
793
980
  return i.length ? i : void 0;
794
981
  }
795
- function H(e) {
796
- var t, i, r;
797
- let l = e.artists.map((e)=>e.name).filter(Boolean).join(" / ") || (null == (t = e.album) ? void 0 : t.name) || void 0, n = e.imageUrl || (null == (i = e.album) ? void 0 : i.imageUrl), a = F(e.artists), o = E(e.duration);
798
- return $({
982
+ function en(e) {
983
+ var t, i;
984
+ let l = e.artists.map((e)=>e.name).filter(Boolean).join(" / ") || (null == (t = e.album) ? void 0 : t.name) || void 0, r = e.imageUrl || (null == (i = e.album) ? void 0 : i.imageUrl), a = ea(e.artists), n = Z(e.duration);
985
+ return q({
799
986
  id: e.id,
800
987
  type: "url",
801
988
  mediaType: "song",
802
- link: (r = e.id, `${y}${r}`),
989
+ link: O(e.id),
803
990
  title: e.name
804
991
  }, l ? {
805
992
  subtitle: l
806
- } : {}, n ? {
807
- posterPath: n,
808
- coverUrl: n
993
+ } : {}, r ? {
994
+ posterPath: r,
995
+ coverUrl: r
809
996
  } : {}, e.duration > 0 ? {
810
997
  duration: e.duration,
811
- durationText: o
998
+ durationText: n
812
999
  } : {}, a ? {
813
1000
  peoples: a
814
1001
  } : {});
815
1002
  }
816
- function q(e) {
1003
+ function eo(e) {
817
1004
  var t;
818
- let i = e.artists.map((e)=>e.name).filter(Boolean).join(" / "), r = F(e.artists);
819
- return $({
1005
+ let i = e.artists.map((e)=>e.name).filter(Boolean).join(" / "), l = ea(e.artists);
1006
+ return q({
820
1007
  id: e.id,
821
1008
  type: "url",
822
1009
  mediaType: "album",
823
- link: (t = e.id, `${g}${t}`),
1010
+ link: (t = e.id, `${P}${t}`),
824
1011
  title: e.name
825
1012
  }, i ? {
826
1013
  subtitle: i
@@ -829,17 +1016,18 @@ function q(e) {
829
1016
  coverUrl: e.imageUrl
830
1017
  } : {}, e.released ? {
831
1018
  releaseDate: e.released
832
- } : {}, r ? {
833
- peoples: r
1019
+ } : {}, l ? {
1020
+ peoples: l
834
1021
  } : {});
835
1022
  }
836
- function B(e) {
1023
+ function es(e) {
837
1024
  var t;
838
- return $({
1025
+ let i = er(e.tags);
1026
+ return q({
839
1027
  id: e.id,
840
1028
  type: "url",
841
1029
  mediaType: "playlist",
842
- link: (t = e.id, `${h}${t}`),
1030
+ link: (t = e.id, `${S}${t}`),
843
1031
  title: e.name
844
1032
  }, e.owner ? {
845
1033
  subtitle: e.owner
@@ -848,10 +1036,56 @@ function B(e) {
848
1036
  coverUrl: e.imageUrl
849
1037
  } : {}, e.description ? {
850
1038
  description: e.description
1039
+ } : {}, i ? {
1040
+ genreItems: i
851
1041
  } : {});
852
1042
  }
853
- function z(e, t) {
854
- return $({
1043
+ function eu(e) {
1044
+ var t;
1045
+ let i = [
1046
+ e.host || "",
1047
+ e.category || ""
1048
+ ].filter(Boolean).join(" · ") || void 0;
1049
+ return q({
1050
+ id: `dj:${e.id}`,
1051
+ type: "url",
1052
+ mediaType: "playlist",
1053
+ link: (t = e.id, `${C}${t}`),
1054
+ title: e.name
1055
+ }, i ? {
1056
+ subtitle: i
1057
+ } : {}, e.imageUrl ? {
1058
+ posterPath: e.imageUrl,
1059
+ coverUrl: e.imageUrl
1060
+ } : {}, e.description ? {
1061
+ description: e.description
1062
+ } : {});
1063
+ }
1064
+ function ed(e) {
1065
+ let t = [
1066
+ e.host || "",
1067
+ e.radioName || ""
1068
+ ].filter(Boolean).join(" · ") || void 0, i = Z(e.duration);
1069
+ return q({
1070
+ id: e.mainSongId,
1071
+ type: "url",
1072
+ mediaType: "song",
1073
+ link: O(e.mainSongId),
1074
+ title: e.name
1075
+ }, t ? {
1076
+ subtitle: t
1077
+ } : {}, e.imageUrl ? {
1078
+ posterPath: e.imageUrl,
1079
+ coverUrl: e.imageUrl
1080
+ } : {}, e.duration > 0 ? {
1081
+ duration: e.duration,
1082
+ durationText: i
1083
+ } : {}, e.description ? {
1084
+ description: e.description
1085
+ } : {});
1086
+ }
1087
+ function ec(e, t) {
1088
+ return q({
855
1089
  id: e.id,
856
1090
  type: "person",
857
1091
  mediaType: "person",
@@ -866,38 +1100,39 @@ function z(e, t) {
866
1100
  description: t
867
1101
  } : {});
868
1102
  }
869
- function G(e) {
1103
+ function ep(e) {
870
1104
  let t = new Set(), i = [];
871
- for (let r of e){
872
- let e = `${r.mediaType || r.type}:${r.id}`;
873
- t.has(e) || (t.add(e), i.push(r));
1105
+ for (let l of e){
1106
+ let e = `${l.mediaType || l.type}:${l.id}`;
1107
+ t.has(e) || (t.add(e), i.push(l));
874
1108
  }
875
1109
  return i;
876
1110
  }
877
- function J(e) {
1111
+ function ef(e) {
878
1112
  for(var t = 1; t < arguments.length; t++){
879
- var i = null != arguments[t] ? arguments[t] : {}, r = Object.keys(i);
880
- "function" == typeof Object.getOwnPropertySymbols && (r = r.concat(Object.getOwnPropertySymbols(i).filter(function(e) {
1113
+ var i = null != arguments[t] ? arguments[t] : {}, l = Object.keys(i);
1114
+ "function" == typeof Object.getOwnPropertySymbols && (l = l.concat(Object.getOwnPropertySymbols(i).filter(function(e) {
881
1115
  return Object.getOwnPropertyDescriptor(i, e).enumerable;
882
- }))), r.forEach(function(t) {
883
- var r;
884
- r = i[t], t in e ? Object.defineProperty(e, t, {
885
- value: r,
1116
+ }))), l.forEach(function(t) {
1117
+ var l;
1118
+ l = i[t], t in e ? Object.defineProperty(e, t, {
1119
+ value: l,
886
1120
  enumerable: !0,
887
1121
  configurable: !0,
888
1122
  writable: !0
889
- }) : e[t] = r;
1123
+ }) : e[t] = l;
890
1124
  });
891
1125
  }
892
1126
  return e;
893
1127
  }
894
- let K = "ncm:config", X = "ncm:deviceId", Z = "ncm:serverCookies", Y = "ncm:account", Q = "ncm:streams", ee = "ncm:songMeta", et = {
1128
+ let em = "ncm:config", ey = "ncm:deviceId", eg = "ncm:serverCookies", ev = "ncm:account", eh = "ncm:streams", eb = "ncm:songMeta", ek = {
895
1129
  cookie: "",
896
1130
  quality: "exhigh",
897
1131
  allowTrial: !1,
898
- playerType: "auto"
1132
+ playerType: "auto",
1133
+ reportHistory: !1
899
1134
  };
900
- function ei(e) {
1135
+ function eA(e) {
901
1136
  try {
902
1137
  let t = Widget.storage.get(e);
903
1138
  if (null == t) return null;
@@ -909,61 +1144,65 @@ function ei(e) {
909
1144
  return null;
910
1145
  }
911
1146
  }
912
- function er(e, t) {
1147
+ function eP(e, t) {
913
1148
  try {
914
1149
  Widget.storage.set(e, t);
915
1150
  } catch (e) {}
916
1151
  }
917
- function el(e) {
1152
+ function eS(e) {
918
1153
  try {
919
1154
  Widget.storage.remove(e);
920
1155
  } catch (e) {}
921
1156
  }
922
- function en(e) {
923
- return "standard" === e || "higher" === e || "exhigh" === e || "lossless" === e || "hires" === e ? e : "exhigh";
1157
+ function eC(e) {
1158
+ return e && p.includes(e) ? e : "exhigh";
924
1159
  }
925
- function ea(e) {
1160
+ function eI(e) {
926
1161
  return "system" === e || "app" === e || "auto" === e ? e : "auto";
927
1162
  }
928
- function eo() {
929
- let e = ei(K);
1163
+ function eU() {
1164
+ let e = eA(em);
930
1165
  return e && "object" == typeof e ? {
931
- cookie: "string" == typeof e.cookie ? e.cookie : et.cookie,
932
- quality: en(e.quality),
1166
+ cookie: "string" == typeof e.cookie ? e.cookie : ek.cookie,
1167
+ quality: eC(e.quality),
933
1168
  allowTrial: !!e.allowTrial,
934
- playerType: ea(e.playerType)
935
- } : J({}, et);
1169
+ playerType: eI(e.playerType),
1170
+ reportHistory: !!e.reportHistory
1171
+ } : ef({}, ek);
936
1172
  }
937
- function es(e) {
938
- let t = eo();
1173
+ function ew(e) {
1174
+ let t = eU();
939
1175
  if (!e) return t;
940
1176
  let i = {
941
1177
  cookie: "string" == typeof e.cookie ? e.cookie.trim() : t.cookie,
942
- quality: void 0 !== e.quality ? en(e.quality) : t.quality,
1178
+ quality: void 0 !== e.quality ? eC(e.quality) : t.quality,
943
1179
  allowTrial: void 0 !== e.allowTrial ? "true" === e.allowTrial : t.allowTrial,
944
- playerType: void 0 !== e.playerType ? ea(e.playerType) : t.playerType
1180
+ playerType: void 0 !== e.playerType ? eI(e.playerType) : t.playerType,
1181
+ reportHistory: void 0 !== e.reportHistory ? "true" === e.reportHistory : t.reportHistory
945
1182
  };
946
- return i.cookie !== t.cookie && (el(Y), el(Q)), er(K, i), i;
1183
+ return i.cookie !== t.cookie && (eS(ev), eS(eh)), eP(em, i), i;
947
1184
  }
948
- function eu() {
949
- let e = ei(Z);
950
- return e && "object" == typeof e ? J({}, e) : {};
1185
+ function eO() {
1186
+ let e = eA(eg);
1187
+ return e && "object" == typeof e ? ef({}, e) : {};
951
1188
  }
952
- function ed(e) {
1189
+ function eM(e) {
953
1190
  if (!(Object.keys(e.updates).length > 0) && !e.deletes.length) return;
954
- let t = eu();
1191
+ let t = eO();
955
1192
  for (let i of e.deletes)delete t[i];
956
- for (let [i, r] of Object.entries(e.updates))r && (t[i] = r);
957
- er(Z, t);
958
- }
959
- function ec(e) {
960
- let t = e.filter((e)=>"song" === e.mediaType && "string" == typeof e.id && e.id);
961
- if (!t.length) return;
962
- let i = ei(ee), r = i && "object" == typeof i ? J({}, i) : {};
963
- for (let e of t){
964
- var l;
965
- let t = String(e.id);
966
- delete r[t], r[t] = J({
1193
+ for (let [i, l] of Object.entries(e.updates))l && (t[i] = l);
1194
+ eP(eg, t);
1195
+ }
1196
+ function eT(e, t) {
1197
+ let i = e.filter((e)=>"song" === e.mediaType && "string" == typeof e.id && e.id);
1198
+ if (!i.length) return;
1199
+ let l = new Map();
1200
+ if (t) for (let e of t)e.id && l.set(e.id, e);
1201
+ let r = eA(eb), a = r && "object" == typeof r ? ef({}, r) : {};
1202
+ for (let e of i){
1203
+ var n, o;
1204
+ let t = String(e.id), i = a[t], r = l.get(t), s = null != (n = null == r ? void 0 : r.mvId) ? n : null == i ? void 0 : i.mvId, u = (null == r ? void 0 : r.albumId) || (null == i ? void 0 : i.albumId);
1205
+ delete a[t], a[t] = ef({
967
1206
  id: t,
968
1207
  title: e.title
969
1208
  }, e.subtitle ? {
@@ -976,39 +1215,43 @@ function ec(e) {
976
1215
  duration: e.duration
977
1216
  } : {}, e.durationText ? {
978
1217
  durationText: e.durationText
979
- } : {}, (null == (l = e.peoples) ? void 0 : l.length) ? {
1218
+ } : {}, (null == (o = e.peoples) ? void 0 : o.length) ? {
980
1219
  peoples: e.peoples
1220
+ } : {}, s && s > 0 ? {
1221
+ mvId: s
1222
+ } : {}, u ? {
1223
+ albumId: u
981
1224
  } : {});
982
1225
  }
983
- let n = Object.keys(r);
984
- if (n.length > 160) for (let e of n.slice(0, n.length - 160))delete r[e];
985
- er(ee, r);
1226
+ let s = Object.keys(a);
1227
+ if (s.length > 160) for (let e of s.slice(0, s.length - 160))delete a[e];
1228
+ eP(eb, a);
986
1229
  }
987
- function ep(e, t, i, r, l, n, a) {
1230
+ function ej(e, t, i, l, r, a, n) {
988
1231
  try {
989
- var o = e[n](a), s = o.value;
1232
+ var o = e[a](n), s = o.value;
990
1233
  } catch (e) {
991
1234
  i(e);
992
1235
  return;
993
1236
  }
994
- o.done ? t(s) : Promise.resolve(s).then(r, l);
1237
+ o.done ? t(s) : Promise.resolve(s).then(l, r);
995
1238
  }
996
- function ef(e) {
1239
+ function e$(e) {
997
1240
  return function() {
998
1241
  var t = this, i = arguments;
999
- return new Promise(function(r, l) {
1000
- var n = e.apply(t, i);
1001
- function a(e) {
1002
- ep(n, r, l, a, o, "next", e);
1242
+ return new Promise(function(l, r) {
1243
+ var a = e.apply(t, i);
1244
+ function n(e) {
1245
+ ej(a, l, r, n, o, "next", e);
1003
1246
  }
1004
1247
  function o(e) {
1005
- ep(n, r, l, a, o, "throw", e);
1248
+ ej(a, l, r, n, o, "throw", e);
1006
1249
  }
1007
- a(void 0);
1250
+ n(void 0);
1008
1251
  });
1009
1252
  };
1010
1253
  }
1011
- function em(e, t, i) {
1254
+ function eE(e, t, i) {
1012
1255
  return t in e ? Object.defineProperty(e, t, {
1013
1256
  value: i,
1014
1257
  enumerable: !0,
@@ -1016,18 +1259,18 @@ function em(e, t, i) {
1016
1259
  writable: !0
1017
1260
  }) : e[t] = i, e;
1018
1261
  }
1019
- function ey(e) {
1262
+ function eN(e) {
1020
1263
  for(var t = 1; t < arguments.length; t++){
1021
- var i = null != arguments[t] ? arguments[t] : {}, r = Object.keys(i);
1022
- "function" == typeof Object.getOwnPropertySymbols && (r = r.concat(Object.getOwnPropertySymbols(i).filter(function(e) {
1264
+ var i = null != arguments[t] ? arguments[t] : {}, l = Object.keys(i);
1265
+ "function" == typeof Object.getOwnPropertySymbols && (l = l.concat(Object.getOwnPropertySymbols(i).filter(function(e) {
1023
1266
  return Object.getOwnPropertyDescriptor(i, e).enumerable;
1024
- }))), r.forEach(function(t) {
1025
- em(e, t, i[t]);
1267
+ }))), l.forEach(function(t) {
1268
+ eE(e, t, i[t]);
1026
1269
  });
1027
1270
  }
1028
1271
  return e;
1029
1272
  }
1030
- function eg(e, t) {
1273
+ function eR(e, t) {
1031
1274
  return t = null != t ? t : {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : (function(e) {
1032
1275
  var t = Object.keys(e);
1033
1276
  if (Object.getOwnPropertySymbols) {
@@ -1039,12 +1282,12 @@ function eg(e, t) {
1039
1282
  Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(t, i));
1040
1283
  }), e;
1041
1284
  }
1042
- class eh extends Error {
1285
+ class eD extends Error {
1043
1286
  constructor(e, t = 0, i = !1){
1044
- super(e), em(this, "code", void 0), em(this, "transient", void 0), this.name = "NeteaseApiError", this.code = t, this.transient = i;
1287
+ super(e), eE(this, "code", void 0), eE(this, "transient", void 0), this.name = "NeteaseApiError", this.code = t, this.transient = i;
1045
1288
  }
1046
1289
  }
1047
- let ev = new Set([
1290
+ let eL = new Set([
1048
1291
  "mp3",
1049
1292
  "flac",
1050
1293
  "m4a",
@@ -1053,282 +1296,332 @@ let ev = new Set([
1053
1296
  "wav",
1054
1297
  "mp4"
1055
1298
  ]);
1056
- function eb(e) {
1057
- let t = eu(), i = l(e.cookie), r = {};
1058
- return t.NMTID && (r.NMTID = t.NMTID), t.__csrf && (r.__csrf = t.__csrf), Object.assign(r, i.cookies), !i.cookies.NMTID && t.NMTID && (r.NMTID = t.NMTID), r;
1299
+ function e_(e) {
1300
+ let t = eO(), i = r(e.cookie), l = {};
1301
+ return t.NMTID && (l.NMTID = t.NMTID), t.__csrf && (l.__csrf = t.__csrf), Object.assign(l, i.cookies), !i.cookies.NMTID && t.NMTID && (l.NMTID = t.NMTID), l;
1059
1302
  }
1060
- function ek(e) {
1303
+ function eW(e) {
1061
1304
  return Object.entries(e).map(([e, t])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(t))}`).join("&");
1062
1305
  }
1063
- function eP(e) {
1306
+ function eV(e) {
1064
1307
  if ("string" == typeof e) try {
1065
1308
  return JSON.parse(e);
1066
1309
  } catch (e) {
1067
- throw new eh(Widget.i18n("网易云返回了无法解析的响应"), 0, !1);
1310
+ throw new eD(Widget.i18n("网易云返回了无法解析的响应"), 0, !1);
1068
1311
  }
1069
1312
  if (e && "object" == typeof e) return e;
1070
- throw new eh(Widget.i18n("网易云返回了无效数据"), 0, !1);
1313
+ throw new eD(Widget.i18n("网易云返回了无效数据"), 0, !1);
1071
1314
  }
1072
- function eA(e, t) {
1315
+ function ex(e, t) {
1073
1316
  let i = e.code;
1074
1317
  if (null == i) return;
1075
- let r = Number(i);
1076
- if (t.includes(r)) return;
1077
- if (301 === r || 302 === r || 401 === r) throw new eh(Widget.i18n("网易云登录状态已失效或需要登录,请检查 Cookie 配置"), r, !1);
1078
- if (-460 === r || 460 === r) throw new eh(Widget.i18n("网易云暂时触发风控限制,请稍后重试"), r, !0);
1079
- if (405 === r || 429 === r) throw new eh(Widget.i18n("网易云请求过于频繁,请稍后重试"), r, !0);
1080
- let l = "string" == typeof e.message && e.message.trim() ? e.message.trim() : `code ${r}`;
1081
- throw new eh(`${Widget.i18n("网易云接口返回错误")} (${l})`, r, r >= 500);
1082
- }
1083
- function eC(e) {
1084
- if (e instanceof eh) return e.transient;
1318
+ let l = Number(i);
1319
+ if (t.includes(l)) return;
1320
+ if (301 === l || 302 === l || 401 === l) throw new eD(Widget.i18n("网易云登录状态已失效或需要登录,请检查 Cookie 配置"), l, !1);
1321
+ if (-460 === l || 460 === l) throw new eD(Widget.i18n("网易云暂时触发风控限制,请稍后重试"), l, !0);
1322
+ if (405 === l || 429 === l) throw new eD(Widget.i18n("网易云请求过于频繁,请稍后重试"), l, !0);
1323
+ let r = "string" == typeof e.message && e.message.trim() ? e.message.trim() : `code ${l}`;
1324
+ throw new eD(`${Widget.i18n("网易云接口返回错误")} (${r})`, l, l >= 500);
1325
+ }
1326
+ function eH(e) {
1327
+ if (e instanceof eD) return e.transient;
1085
1328
  let t = e instanceof Error ? e.message : String(e);
1086
1329
  return /^HTTP\s+(?:429|5\d\d)\b/i.test(t);
1087
1330
  }
1088
- function ew(e, t = 3) {
1089
- return ef(function*() {
1331
+ function eF(e, t = 3) {
1332
+ return e$(function*() {
1090
1333
  let i;
1091
- for(let r = 1; r <= t; r++)try {
1092
- return yield e(r);
1334
+ for(let l = 1; l <= t; l++)try {
1335
+ return yield e(l);
1093
1336
  } catch (e) {
1094
- if (i = e, !eC(e) || r >= t) throw e;
1337
+ if (i = e, !eH(e) || l >= t) throw e;
1095
1338
  yield function(e) {
1096
- return ef(function*() {
1339
+ return e$(function*() {
1097
1340
  yield new Promise((t)=>setTimeout(t, e));
1098
1341
  })();
1099
- }(250 * r);
1342
+ }(250 * l);
1100
1343
  }
1101
1344
  throw i;
1102
1345
  })();
1103
1346
  }
1104
- function eS(e, t) {
1105
- return ef(function*(e, t = {}, i, l = {}) {
1347
+ function eq(e, t) {
1348
+ return e$(function*(e, t = {}, i, r = {}) {
1106
1349
  var o, u;
1107
- let d, c = l.method || "GET", p = eb(i), f = ey({}, t);
1350
+ let d, c = r.method || "GET", p = e_(i), f = eN({}, t);
1108
1351
  "POST" === c && p.__csrf && void 0 === f.csrf_token && (f.csrf_token = p.__csrf);
1109
- let m = r(p), y = ey({
1352
+ let m = l(p), y = eN({
1110
1353
  "user-agent": s,
1111
- referer: `${a}/`
1354
+ referer: `${n}/`
1112
1355
  }, m ? {
1113
1356
  cookie: m
1114
- } : {}), g = `${a}${e}`;
1115
- if ("POST" === c) y["content-type"] = "application/x-www-form-urlencoded", d = ek(f);
1357
+ } : {}), g = `${n}${e}`;
1358
+ if ("POST" === c) y["content-type"] = "application/x-www-form-urlencoded", d = eW(f);
1116
1359
  else {
1117
- let e = ek(f);
1360
+ let e = eW(f);
1118
1361
  e && (g += (g.includes("?") ? "&" : "?") + e);
1119
1362
  }
1120
- let h = yield Widget.http.request(eg(ey({
1363
+ let v = yield Widget.http.request(eR(eN({
1121
1364
  url: g,
1122
1365
  method: c,
1123
1366
  headers: y
1124
1367
  }, void 0 !== d ? {
1125
1368
  data: d
1126
1369
  } : {}), {
1127
- timeout: null != (o = l.timeout) ? o : 18
1370
+ timeout: null != (o = r.timeout) ? o : 18
1128
1371
  }));
1129
- ed(n(h.headers));
1130
- let v = eP(h.data);
1131
- return eA(v, null != (u = l.allowedCodes) ? u : [
1372
+ eM(a(v.headers));
1373
+ let h = eV(v.data);
1374
+ return ex(h, null != (u = r.allowedCodes) ? u : [
1132
1375
  200
1133
- ]), v;
1376
+ ]), h;
1134
1377
  }).apply(this, arguments);
1135
1378
  }
1136
- function eO(e, t, i) {
1137
- return ef(function*(e, t, i, r = {}) {
1138
- var l, a;
1139
- let s = eb(i), c = Date.now(), p = function() {
1140
- let e = ei(X);
1379
+ function eB(e, t, i) {
1380
+ return e$(function*(e, t, i, l = {}) {
1381
+ var r, n;
1382
+ let s = e_(i), p = Date.now(), f = function() {
1383
+ let e = eA(ey);
1141
1384
  if ("string" == typeof e && /^[0-9A-F]{52}$/.test(e)) return e;
1142
1385
  let t = "";
1143
1386
  for(let e = 0; e < 52; e++)t += Math.floor(16 * Math.random()).toString(16).toUpperCase();
1144
- return er(X, t), t;
1145
- }(), f = eg(ey({}, u), {
1146
- deviceId: p,
1387
+ return eP(ey, t), t;
1388
+ }(), m = "android" === l.clientProfile, y = eR(eN({}, m ? d : u), {
1389
+ deviceId: f,
1147
1390
  mobilename: "",
1148
- buildver: String(Math.floor(c / 1000)),
1149
- requestId: `${c}_${String(Math.floor(1000 * Math.random())).padStart(4, "0")}`,
1391
+ buildver: String(Math.floor(p / 1000)),
1392
+ requestId: `${p}_${String(Math.floor(1000 * Math.random())).padStart(4, "0")}`,
1150
1393
  __csrf: s.__csrf || ""
1151
1394
  });
1152
- s.MUSIC_U && (f.MUSIC_U = s.MUSIC_U), s.NMTID && (f.NMTID = s.NMTID);
1153
- let m = function(e, t, i = o) {
1154
- let r = JSON.stringify(t), l = function(e) {
1155
- let t = w(e), i = 8 * t.length, r = ((t.length + 8 >>> 6) + 1) * 64, l = new Uint8Array(r);
1156
- l.set(t), l[t.length] = 0x80;
1157
- let n = i >>> 0, a = Math.floor(i / 0x100000000) >>> 0, o = r - 8;
1158
- l[o] = 0xff & n, l[o + 1] = n >>> 8 & 0xff, l[o + 2] = n >>> 16 & 0xff, l[o + 3] = n >>> 24 & 0xff, l[o + 4] = 0xff & a, l[o + 5] = a >>> 8 & 0xff, l[o + 6] = a >>> 16 & 0xff, l[o + 7] = a >>> 24 & 0xff;
1395
+ s.MUSIC_U && (y.MUSIC_U = s.MUSIC_U), s.NMTID && (y.NMTID = s.NMTID);
1396
+ let g = function(e, t, i = o) {
1397
+ let l = JSON.stringify(t), r = function(e) {
1398
+ let t = D(e), i = 8 * t.length, l = ((t.length + 8 >>> 6) + 1) * 64, r = new Uint8Array(l);
1399
+ r.set(t), r[t.length] = 0x80;
1400
+ let a = i >>> 0, n = Math.floor(i / 0x100000000) >>> 0, o = l - 8;
1401
+ r[o] = 0xff & a, r[o + 1] = a >>> 8 & 0xff, r[o + 2] = a >>> 16 & 0xff, r[o + 3] = a >>> 24 & 0xff, r[o + 4] = 0xff & n, r[o + 5] = n >>> 8 & 0xff, r[o + 6] = n >>> 16 & 0xff, r[o + 7] = n >>> 24 & 0xff;
1159
1402
  let s = 0x67452301, u = 0xefcdab89, d = 0x98badcfe, c = 0x10325476, p = new Uint32Array(16);
1160
- for(let e = 0; e < r; e += 64){
1403
+ for(let e = 0; e < l; e += 64){
1161
1404
  for(let t = 0; t < 16; t++){
1162
1405
  let i = e + 4 * t;
1163
- p[t] = (l[i] | l[i + 1] << 8 | l[i + 2] << 16 | l[i + 3] << 24) >>> 0;
1406
+ p[t] = (r[i] | r[i + 1] << 8 | r[i + 2] << 16 | r[i + 3] << 24) >>> 0;
1164
1407
  }
1165
- let t = s, i = u, r = d, n = c;
1408
+ let t = s, i = u, l = d, a = c;
1166
1409
  for(let e = 0; e < 64; e++){
1167
1410
  var f, m;
1168
- let l, a;
1169
- e < 16 ? (l = i & r | ~i & n, a = e) : e < 32 ? (l = n & i | ~n & r, a = 5 * e + 1 & 15) : e < 48 ? (l = i ^ r ^ n, a = 3 * e + 5 & 15) : (l = r ^ (i | ~n), a = 7 * e & 15);
1170
- let o = n;
1171
- n = r, r = i, i = i + ((f = t + l + O[e] + p[a] | 0) << (m = S[e]) | f >>> 32 - m) | 0, t = o;
1411
+ let r, n;
1412
+ e < 16 ? (r = i & l | ~i & a, n = e) : e < 32 ? (r = a & i | ~a & l, n = 5 * e + 1 & 15) : e < 48 ? (r = i ^ l ^ a, n = 3 * e + 5 & 15) : (r = l ^ (i | ~a), n = 7 * e & 15);
1413
+ let o = a;
1414
+ a = l, l = i, i = i + ((f = t + r + W[e] + p[n] | 0) << (m = _[e]) | f >>> 32 - m) | 0, t = o;
1172
1415
  }
1173
- s = s + t | 0, u = u + i | 0, d = d + r | 0, c = c + n | 0;
1416
+ s = s + t | 0, u = u + i | 0, d = d + l | 0, c = c + a | 0;
1174
1417
  }
1175
- return U(s) + U(u) + U(d) + U(c);
1176
- }(`nobody${e}use${r}md5forencrypt`);
1418
+ return V(s) + V(u) + V(d) + V(c);
1419
+ }(`nobody${e}use${l}md5forencrypt`);
1177
1420
  return function(e, t = o) {
1178
- let i = w(e), r = function(e) {
1421
+ let i = D(e), l = function(e) {
1179
1422
  if (16 !== e.length) throw Error(`AES-128 key must be 16 bytes, got ${e.length}`);
1180
1423
  let t = new Uint8Array(176);
1181
1424
  t.set(e);
1182
1425
  for(let e = 4; e < 44; e++){
1183
- let i = (e - 1) * 4, r = t[i], l = t[i + 1], n = t[i + 2], a = t[i + 3];
1426
+ let i = (e - 1) * 4, l = t[i], r = t[i + 1], a = t[i + 2], n = t[i + 3];
1184
1427
  if (e % 4 == 0) {
1185
- let t = r;
1186
- r = I[l] ^ M[e / 4 - 1], l = I[n], n = I[a], a = I[t];
1428
+ let t = l;
1429
+ l = x[r] ^ H[e / 4 - 1], r = x[a], a = x[n], n = x[t];
1187
1430
  }
1188
1431
  let o = (e - 4) * 4, s = 4 * e;
1189
- t[s] = t[o] ^ r, t[s + 1] = t[o + 1] ^ l, t[s + 2] = t[o + 2] ^ n, t[s + 3] = t[o + 3] ^ a;
1432
+ t[s] = t[o] ^ l, t[s + 1] = t[o + 1] ^ r, t[s + 2] = t[o + 2] ^ a, t[s + 3] = t[o + 3] ^ n;
1190
1433
  }
1191
1434
  return t;
1192
- }(w(t)), l = 16 - i.length % 16, n = new Uint8Array(i.length + l);
1193
- n.set(i), n.fill(l, i.length);
1194
- let a = new Uint8Array(16), s = "";
1195
- for(let e = 0; e < n.length; e += 16){
1196
- a.set(n.subarray(e, e + 16)), function(e, t) {
1435
+ }(D(t)), r = 16 - i.length % 16, a = new Uint8Array(i.length + r);
1436
+ a.set(i), a.fill(r, i.length);
1437
+ let n = new Uint8Array(16), s = "";
1438
+ for(let e = 0; e < a.length; e += 16){
1439
+ n.set(a.subarray(e, e + 16)), function(e, t) {
1197
1440
  for(let i = 0; i < 16; i++)e[i] ^= t[i];
1198
1441
  for(let i = 1; i <= 10; i++){
1199
- for(let t = 0; t < 16; t++)e[t] = I[e[t]];
1200
- let r = e[1];
1201
- if (e[1] = e[5], e[5] = e[9], e[9] = e[13], e[13] = r, r = e[2], e[2] = e[10], e[10] = r, r = e[6], e[6] = e[14], e[14] = r, r = e[15], e[15] = e[11], e[11] = e[7], e[7] = e[3], e[3] = r, i < 10) for(let t = 0; t < 16; t += 4){
1202
- let i = e[t], r = e[t + 1], l = e[t + 2], n = e[t + 3], a = i ^ r ^ l ^ n;
1203
- e[t] = i ^ a ^ T(i ^ r), e[t + 1] = r ^ a ^ T(r ^ l), e[t + 2] = l ^ a ^ T(l ^ n), e[t + 3] = n ^ a ^ T(n ^ i);
1442
+ for(let t = 0; t < 16; t++)e[t] = x[e[t]];
1443
+ let l = e[1];
1444
+ if (e[1] = e[5], e[5] = e[9], e[9] = e[13], e[13] = l, l = e[2], e[2] = e[10], e[10] = l, l = e[6], e[6] = e[14], e[14] = l, l = e[15], e[15] = e[11], e[11] = e[7], e[7] = e[3], e[3] = l, i < 10) for(let t = 0; t < 16; t += 4){
1445
+ let i = e[t], l = e[t + 1], r = e[t + 2], a = e[t + 3], n = i ^ l ^ r ^ a;
1446
+ e[t] = i ^ n ^ F(i ^ l), e[t + 1] = l ^ n ^ F(l ^ r), e[t + 2] = r ^ n ^ F(r ^ a), e[t + 3] = a ^ n ^ F(a ^ i);
1204
1447
  }
1205
- let l = 16 * i;
1206
- for(let i = 0; i < 16; i++)e[i] ^= t[l + i];
1448
+ let r = 16 * i;
1449
+ for(let i = 0; i < 16; i++)e[i] ^= t[r + i];
1207
1450
  }
1208
- }(a, r);
1209
- for(let e = 0; e < 16; e++)s += a[e].toString(16).padStart(2, "0").toUpperCase();
1451
+ }(n, l);
1452
+ for(let e = 0; e < 16; e++)s += n[e].toString(16).padStart(2, "0").toUpperCase();
1210
1453
  }
1211
1454
  return s;
1212
- }(`${e}-36cd479b6b5-${r}-36cd479b6b5-${l}`, i);
1213
- }(e, eg(ey({}, t), {
1214
- header: f,
1455
+ }(`${e}-36cd479b6b5-${l}-36cd479b6b5-${r}`, i);
1456
+ }(e, eR(eN({}, t), {
1457
+ header: y,
1215
1458
  e_r: !1
1216
- })), y = Object.entries(f).map(([e, t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("; "), g = `https://interfacepc.music.163.com${e.replace(/^\/api\//, "/eapi/")}`, h = yield Widget.http.request({
1217
- url: g,
1459
+ })), v = Object.entries(y).map(([e, t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("; "), h = `https://interfacepc.music.163.com${e.replace(/^\/api\//, "/eapi/")}`, b = yield Widget.http.request({
1460
+ url: h,
1218
1461
  method: "POST",
1219
1462
  headers: {
1220
1463
  "content-type": "application/x-www-form-urlencoded",
1221
- "user-agent": d,
1222
- cookie: y
1464
+ "user-agent": m ? "NeteaseMusic/9.5.61.260802021928(9005061);Dalvik/2.1.0 (Linux; U; Android 12; HBN-AL00 Build/cd737a2.0)" : c,
1465
+ cookie: v
1223
1466
  },
1224
- data: `params=${m}`,
1225
- timeout: null != (l = r.timeout) ? l : 18
1467
+ data: `params=${g}`,
1468
+ timeout: null != (r = l.timeout) ? r : 18
1226
1469
  });
1227
- ed(n(h.headers));
1228
- let v = eP(h.data);
1229
- return eA(v, null != (a = r.allowedCodes) ? a : [
1470
+ eM(a(b.headers));
1471
+ let k = eV(b.data);
1472
+ return ex(k, null != (n = l.allowedCodes) ? n : [
1230
1473
  200
1231
- ]), v;
1474
+ ]), k;
1232
1475
  }).apply(this, arguments);
1233
1476
  }
1234
- function eU(e) {
1235
- return ef(function*() {
1236
- var t, i, r;
1237
- let n = l(e.cookie);
1238
- if (!n.hasMusicU) throw Error(Widget.i18n("请在模块设置中填写包含 MUSIC_U 的网易云音乐 Cookie 后查看个人内容"));
1239
- let a = n.cookies.MUSIC_U, o = function(e, t = Date.now()) {
1477
+ function ez(e) {
1478
+ return e$(function*() {
1479
+ var t, i, l;
1480
+ let a = r(e.cookie);
1481
+ if (!a.hasMusicU) throw Error(Widget.i18n("请在模块设置中填写包含 MUSIC_U 的网易云音乐 Cookie 后查看个人内容"));
1482
+ let n = a.cookies.MUSIC_U, o = function(e, t = Date.now()) {
1240
1483
  if (!e) return null;
1241
- let i = ei(Y);
1484
+ let i = eA(ev);
1242
1485
  return i && i.cookieKey === e && i.uid && !(t - i.cachedAt > 1800000) ? i : null;
1243
- }(a);
1486
+ }(n);
1244
1487
  if (o) return {
1245
1488
  uid: o.uid,
1246
1489
  nickname: o.nickname
1247
1490
  };
1248
- let s = yield eS("/api/nuser/account/get", {}, e), u = null != (t = null == (i = s.profile) ? void 0 : i.userId) ? t : null == (r = s.account) ? void 0 : r.id, d = u ? String(u) : "";
1491
+ let s = yield eq("/api/nuser/account/get", {}, e), u = null != (t = null == (i = s.profile) ? void 0 : i.userId) ? t : null == (l = s.account) ? void 0 : l.id, d = u ? String(u) : "";
1249
1492
  if (!d || !/^\d+$/.test(d) || !s.profile) throw Error(Widget.i18n("网易云登录状态已失效或 Cookie 无效,请更新包含 MUSIC_U 的 Cookie"));
1250
1493
  let c = "string" == typeof s.profile.nickname ? s.profile.nickname : "";
1251
- return !function(e, t, i, r = Date.now()) {
1252
- e && i && er(Y, {
1494
+ return !function(e, t, i, l = Date.now()) {
1495
+ e && i && eP(ev, {
1253
1496
  uid: e,
1254
1497
  nickname: t,
1255
1498
  cookieKey: i,
1256
- cachedAt: r
1499
+ cachedAt: l
1257
1500
  });
1258
- }(d, c, a), {
1501
+ }(d, c, n), {
1259
1502
  uid: d,
1260
1503
  nickname: c
1261
1504
  };
1262
1505
  })();
1263
1506
  }
1264
- function eI(e, t) {
1265
- return ef(function*() {
1507
+ function eJ(e, t) {
1508
+ return e$(function*() {
1266
1509
  let i = Array.from(new Set(e.filter((e)=>/^\d+$/.test(e))));
1267
1510
  if (!i.length) return [];
1268
- let r = new Map();
1511
+ let l = new Map();
1269
1512
  for(let e = 0; e < i.length; e += 100){
1270
- let l = i.slice(e, e + 100), n = yield eS("/api/v3/song/detail", {
1271
- c: JSON.stringify(l.map((e)=>({
1513
+ let r = i.slice(e, e + 100), a = yield eq("/api/v3/song/detail", {
1514
+ c: JSON.stringify(r.map((e)=>({
1272
1515
  id: Number(e)
1273
1516
  })))
1274
1517
  }, t, {
1275
1518
  method: "POST"
1276
1519
  });
1277
- for (let e of Array.isArray(n.songs) ? n.songs : []){
1278
- let t = V(e);
1279
- t && r.set(t.id, t);
1520
+ for (let e of Array.isArray(a.songs) ? a.songs : []){
1521
+ let t = ee(e);
1522
+ t && l.set(t.id, t);
1280
1523
  }
1281
1524
  }
1282
- let l = [];
1525
+ let r = [];
1283
1526
  for (let e of i){
1284
- let t = r.get(e);
1285
- t && l.push(t);
1527
+ let t = l.get(e);
1528
+ t && r.push(t);
1286
1529
  }
1287
- return l;
1530
+ return r;
1288
1531
  })();
1289
1532
  }
1290
- function eM(e, t, i, r, l, n, a) {
1533
+ let eG = /\[(\d{1,3}):(\d{2})(?:[.:](\d{1,3}))?\]/g, eK = /^\[(ti|ar|al|by|offset):[^\]]*\]$/i;
1534
+ function eZ(e) {
1535
+ if ("string" != typeof e) return "";
1536
+ let t = e.replace(/\r\n?/g, "\n").trim();
1537
+ if (!t) return "";
1538
+ let i = t.split("\n").map((e)=>e.trim()).filter(Boolean);
1539
+ return 1 === i.length && /纯音乐[,,]?\s*请欣赏/.test(i[0]) ? "" : t;
1540
+ }
1541
+ function eX(e) {
1542
+ let t = [], i = [];
1543
+ for (let r of e.replace(/\r\n?/g, "\n").split("\n")){
1544
+ let e = r.trim();
1545
+ if (!e) continue;
1546
+ if (eK.test(e)) {
1547
+ t.push(e);
1548
+ continue;
1549
+ }
1550
+ let a = Array.from(e.matchAll(eG));
1551
+ if (!a.length) continue;
1552
+ let n = e.replace(eG, "").trim();
1553
+ if (n) for (let e of a){
1554
+ var l;
1555
+ let t = Number(e[1]), r = Number(e[2]), a = (l = e[3]) ? 1 === l.length ? 100 * Number(l) : 2 === l.length ? 10 * Number(l) : Number(l.slice(0, 3)) : 0;
1556
+ if (!Number.isFinite(t) || !Number.isFinite(r) || !Number.isFinite(a)) continue;
1557
+ let o = 60000 * t + 1000 * r + a;
1558
+ i.push({
1559
+ timeMs: o,
1560
+ timestamp: function(e) {
1561
+ let t = Math.max(0, Math.round(e)), i = Math.floor(t / 60000), l = Math.floor(t % 60000 / 1000), r = Math.floor(t % 1000 / 10);
1562
+ return `[${String(i).padStart(2, "0")}:${String(l).padStart(2, "0")}.${String(r).padStart(2, "0")}]`;
1563
+ }(o),
1564
+ text: n
1565
+ });
1566
+ }
1567
+ }
1568
+ return i.sort((e, t)=>e.timeMs - t.timeMs), {
1569
+ metadata: t,
1570
+ lines: i
1571
+ };
1572
+ }
1573
+ function eQ(e) {
1574
+ return `data:text/plain;charset=utf-8;base64,${function(e) {
1575
+ let t = "";
1576
+ for(let i = 0; i < e.length; i += 3){
1577
+ let l = e[i], r = i + 1 < e.length, a = i + 2 < e.length, n = l << 16 | (r ? e[i + 1] : 0) << 8 | (a ? e[i + 2] : 0);
1578
+ t += L[n >>> 18 & 0x3f], t += L[n >>> 12 & 0x3f], t += r ? L[n >>> 6 & 0x3f] : "=", t += a ? L[0x3f & n] : "=";
1579
+ }
1580
+ return t;
1581
+ }(D(e))}`;
1582
+ }
1583
+ function eY(e, t, i, l, r, a, n) {
1291
1584
  try {
1292
- var o = e[n](a), s = o.value;
1585
+ var o = e[a](n), s = o.value;
1293
1586
  } catch (e) {
1294
1587
  i(e);
1295
1588
  return;
1296
1589
  }
1297
- o.done ? t(s) : Promise.resolve(s).then(r, l);
1590
+ o.done ? t(s) : Promise.resolve(s).then(l, r);
1298
1591
  }
1299
- function eT(e) {
1592
+ function e0(e) {
1300
1593
  return function() {
1301
1594
  var t = this, i = arguments;
1302
- return new Promise(function(r, l) {
1303
- var n = e.apply(t, i);
1304
- function a(e) {
1305
- eM(n, r, l, a, o, "next", e);
1595
+ return new Promise(function(l, r) {
1596
+ var a = e.apply(t, i);
1597
+ function n(e) {
1598
+ eY(a, l, r, n, o, "next", e);
1306
1599
  }
1307
1600
  function o(e) {
1308
- eM(n, r, l, a, o, "throw", e);
1601
+ eY(a, l, r, n, o, "throw", e);
1309
1602
  }
1310
- a(void 0);
1603
+ n(void 0);
1311
1604
  });
1312
1605
  };
1313
1606
  }
1314
- function e$(e) {
1607
+ function e1(e) {
1315
1608
  for(var t = 1; t < arguments.length; t++){
1316
- var i = null != arguments[t] ? arguments[t] : {}, r = Object.keys(i);
1317
- "function" == typeof Object.getOwnPropertySymbols && (r = r.concat(Object.getOwnPropertySymbols(i).filter(function(e) {
1609
+ var i = null != arguments[t] ? arguments[t] : {}, l = Object.keys(i);
1610
+ "function" == typeof Object.getOwnPropertySymbols && (l = l.concat(Object.getOwnPropertySymbols(i).filter(function(e) {
1318
1611
  return Object.getOwnPropertyDescriptor(i, e).enumerable;
1319
- }))), r.forEach(function(t) {
1320
- var r;
1321
- r = i[t], t in e ? Object.defineProperty(e, t, {
1322
- value: r,
1612
+ }))), l.forEach(function(t) {
1613
+ var l;
1614
+ l = i[t], t in e ? Object.defineProperty(e, t, {
1615
+ value: l,
1323
1616
  enumerable: !0,
1324
1617
  configurable: !0,
1325
1618
  writable: !0
1326
- }) : e[t] = r;
1619
+ }) : e[t] = l;
1327
1620
  });
1328
1621
  }
1329
1622
  return e;
1330
1623
  }
1331
- function ej(e, t) {
1624
+ function e2(e, t) {
1332
1625
  return t = null != t ? t : {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : (function(e) {
1333
1626
  var t = Object.keys(e);
1334
1627
  if (Object.getOwnPropertySymbols) {
@@ -1340,95 +1633,161 @@ function ej(e, t) {
1340
1633
  Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(t, i));
1341
1634
  }), e;
1342
1635
  }
1343
- function eD(e) {
1636
+ function e3(e) {
1344
1637
  let t = Number(e);
1345
1638
  return Number.isFinite(t) && t >= 1 ? Math.floor(t) : 1;
1346
1639
  }
1347
- function eN(e, t = 30) {
1640
+ function e6(e, t = 30) {
1348
1641
  let i = Number(e.offset);
1349
- return void 0 !== e.offset && "" !== e.offset && Number.isFinite(i) && i >= 0 ? Math.floor(i) : (eD(e.page) - 1) * t;
1642
+ return void 0 !== e.offset && "" !== e.offset && Number.isFinite(i) && i >= 0 ? Math.floor(i) : (e3(e.page) - 1) * t;
1350
1643
  }
1351
- function eR(e, t, i = 30) {
1352
- let r = eN(t, i);
1353
- return e.slice(r, r + i);
1644
+ function e8(e, t, i = 30) {
1645
+ let l = e6(t, i);
1646
+ return e.slice(l, l + i);
1354
1647
  }
1355
- function eL(e, t) {
1648
+ function e5(e, t) {
1356
1649
  return e.startsWith(t) ? e.slice(t.length) : e;
1357
1650
  }
1358
- function eE(e, t) {
1359
- return eT(function*(e, t, i = 300) {
1360
- var r;
1361
- let l = (yield eS("/api/v6/playlist/detail", {
1651
+ function e4(e, t) {
1652
+ eT(t, e.map((e)=>{
1653
+ var t;
1654
+ return e1({
1655
+ id: e.id
1656
+ }, e.mvId ? {
1657
+ mvId: e.mvId
1658
+ } : {}, (null == (t = e.album) ? void 0 : t.id) ? {
1659
+ albumId: e.album.id
1660
+ } : {});
1661
+ }));
1662
+ }
1663
+ function e9(e, t) {
1664
+ return e0(function*(e, t, i = 300) {
1665
+ var l;
1666
+ let r = (yield eq("/api/v6/playlist/detail", {
1362
1667
  id: e,
1363
1668
  n: 100000,
1364
1669
  s: 0
1365
1670
  }, t, {
1366
1671
  method: "POST"
1367
- })).playlist, n = null != (r = x(l)) ? r : {
1672
+ })).playlist, a = null != (l = Y(r)) ? l : {
1368
1673
  id: e,
1369
1674
  name: e
1370
- }, a = (Array.isArray(null == l ? void 0 : l.tracks) ? l.tracks : []).map(V).filter((e)=>null !== e), o = new Map(a.map((e)=>[
1675
+ }, n = (Array.isArray(null == r ? void 0 : r.tracks) ? r.tracks : []).map(ee).filter((e)=>null !== e), o = new Map(n.map((e)=>[
1371
1676
  e.id,
1372
1677
  e
1373
- ])), s = (Array.isArray(null == l ? void 0 : l.trackIds) ? l.trackIds : []).map((e)=>(null == e ? void 0 : e.id) !== void 0 ? String(e.id) : "").filter((e)=>P(e)).slice(0, i);
1678
+ ])), s = (Array.isArray(null == r ? void 0 : r.trackIds) ? r.trackIds : []).map((e)=>(null == e ? void 0 : e.id) !== void 0 ? String(e.id) : "").filter((e)=>$(e)).slice(0, i);
1374
1679
  if (!s.length) return {
1375
- playlist: n,
1376
- tracks: a.slice(0, i)
1680
+ playlist: a,
1681
+ tracks: n.slice(0, i)
1377
1682
  };
1378
1683
  let u = s.filter((e)=>!o.has(e));
1379
- if (u.length) for (let e of yield eI(u, t))o.set(e.id, e);
1684
+ if (u.length) for (let e of yield eJ(u, t))o.set(e.id, e);
1380
1685
  let d = [];
1381
1686
  for (let e of s){
1382
1687
  let t = o.get(e);
1383
1688
  t && d.push(t);
1384
1689
  }
1385
1690
  return {
1386
- playlist: n,
1691
+ playlist: a,
1387
1692
  tracks: d
1388
1693
  };
1389
1694
  }).apply(this, arguments);
1390
1695
  }
1391
- function eW(e, t) {
1392
- return eT(function*() {
1393
- if (!l(t.cookie).hasMusicU) throw Error(Widget.i18n("私人漫游需要配置网易云音乐 Cookie(含 MUSIC_U)"));
1394
- let i = yield eO("/api/v1/radio/get", {
1696
+ function e7(e, t) {
1697
+ return e0(function*(e, t, i = 100) {
1698
+ var l;
1699
+ let [r, a] = yield Promise.allSettled([
1700
+ eB("/api/djradio/v2/get", {
1701
+ id: e
1702
+ }, t),
1703
+ eB("/api/dj/program/byradio", {
1704
+ radioId: e,
1705
+ limit: i,
1706
+ offset: 0,
1707
+ asc: !1
1708
+ }, t)
1709
+ ]), n = null != (l = et("fulfilled" === r.status ? r.value.data : void 0)) ? l : {
1710
+ id: e,
1711
+ name: e
1712
+ }, o = ("fulfilled" === a.status && Array.isArray(a.value.programs) ? a.value.programs : []).map(ei).filter((e)=>null !== e).map((e)=>e2(e1({}, e), {
1713
+ host: e.host || n.host,
1714
+ radioName: e.radioName || n.name,
1715
+ imageUrl: e.imageUrl || n.imageUrl
1716
+ }));
1717
+ if (!o.length && "rejected" === r.status && "rejected" === a.status) throw r.reason;
1718
+ return {
1719
+ radio: n,
1720
+ programs: o
1721
+ };
1722
+ }).apply(this, arguments);
1723
+ }
1724
+ function te(e, t, i) {
1725
+ return e0(function*() {
1726
+ if (!r(i.cookie).hasMusicU) throw Error(Widget.i18n("私人漫游需要配置网易云音乐 Cookie(含 MUSIC_U)"));
1727
+ let l = yield eB("/api/v1/radio/get", {
1395
1728
  mode: e,
1396
- subMode: "",
1729
+ subMode: t,
1397
1730
  limit: 10
1398
- }, t);
1399
- return (Array.isArray(i.data) ? i.data : []).map(V).filter((e)=>null !== e);
1731
+ }, i);
1732
+ return (Array.isArray(l.data) ? l.data : []).map(ee).filter((e)=>null !== e);
1400
1733
  })();
1401
1734
  }
1402
- function e_(e, t, i, r, l, n, a) {
1735
+ let tt = {
1736
+ "fm:DEFAULT": {
1737
+ mode: "DEFAULT",
1738
+ subMode: ""
1739
+ },
1740
+ "fm:FAMILIAR": {
1741
+ mode: "FAMILIAR",
1742
+ subMode: ""
1743
+ },
1744
+ "fm:EXPLORE": {
1745
+ mode: "EXPLORE",
1746
+ subMode: ""
1747
+ },
1748
+ "fm:SCENE_EXERCISE": {
1749
+ mode: "SCENE_RCMD",
1750
+ subMode: "EXERCISE"
1751
+ },
1752
+ "fm:SCENE_FOCUS": {
1753
+ mode: "SCENE_RCMD",
1754
+ subMode: "FOCUS"
1755
+ },
1756
+ "fm:SCENE_NIGHT": {
1757
+ mode: "SCENE_RCMD",
1758
+ subMode: "NIGHT_EMO"
1759
+ }
1760
+ };
1761
+ function ti(e, t, i, l, r, a, n) {
1403
1762
  try {
1404
- var o = e[n](a), s = o.value;
1763
+ var o = e[a](n), s = o.value;
1405
1764
  } catch (e) {
1406
1765
  i(e);
1407
1766
  return;
1408
1767
  }
1409
- o.done ? t(s) : Promise.resolve(s).then(r, l);
1768
+ o.done ? t(s) : Promise.resolve(s).then(l, r);
1410
1769
  }
1411
- function ex(e) {
1770
+ function tl(e) {
1412
1771
  return function() {
1413
1772
  var t = this, i = arguments;
1414
- return new Promise(function(r, l) {
1415
- var n = e.apply(t, i);
1416
- function a(e) {
1417
- e_(n, r, l, a, o, "next", e);
1773
+ return new Promise(function(l, r) {
1774
+ var a = e.apply(t, i);
1775
+ function n(e) {
1776
+ ti(a, l, r, n, o, "next", e);
1418
1777
  }
1419
1778
  function o(e) {
1420
- e_(n, r, l, a, o, "throw", e);
1779
+ ti(a, l, r, n, o, "throw", e);
1421
1780
  }
1422
- a(void 0);
1781
+ n(void 0);
1423
1782
  });
1424
1783
  };
1425
1784
  }
1426
1785
  WidgetMetadata = {
1427
1786
  id: "baranwang.music.netease",
1428
1787
  title: "网易云音乐",
1429
- description: "网易云音乐插件,支持首页推荐、排行榜、新歌速递、歌单分类、私人漫游、歌手主页、搜索、个人音乐库与直接音频播放",
1788
+ description: "网易云音乐插件,支持首页推荐、精品歌单、排行榜、新歌速递、歌单分类与曲风馆、播客电台、私人与场景漫游、歌手主页、搜索、时间轴歌词、个人音乐库与高解析音频播放",
1430
1789
  author: "Baran",
1431
- version: "0.1.0",
1790
+ version: "0.2.0",
1432
1791
  site: "https://github.com/baranwang/rex-widget/tree/main/apps/netease-music",
1433
1792
  requiredVersion: "0.0.7",
1434
1793
  contentType: "music",
@@ -1439,16 +1798,21 @@ WidgetMetadata = {
1439
1798
  en: {
1440
1799
  网易云音乐: "NetEase Cloud Music",
1441
1800
  "网易云音乐 (测试)": "NetEase Cloud Music (Dev)",
1442
- "网易云音乐插件,支持首页推荐、排行榜、新歌速递、歌单分类、私人漫游、歌手主页、搜索、个人音乐库与直接音频播放": "NetEase Cloud Music plugin supporting Home, Charts, New Releases, Playlist Categories, Personal FM, Artists, Search, My Library, and direct audio playback",
1801
+ "网易云音乐插件,支持首页推荐、精品歌单、排行榜、新歌速递、歌单分类与曲风馆、播客电台、私人与场景漫游、歌手主页、搜索、时间轴歌词、个人音乐库与高解析音频播放": "NetEase Cloud Music plugin supporting Home, High-Quality Playlists, Charts, New Releases, Categories & Style Hall, Podcasts, Personal & Scene FM, Artists, Search, Synced Lyrics, My Library, and Hi-Res Audio Playback",
1443
1802
  "网易云音乐 Cookie(可选)": "NetEase Cloud Music Cookie (Optional)",
1444
- "可选。支持直接粘贴 MUSIC_U 值、完整 Cookie 请求头或 Copy as cURL;不填可直接使用公开曲库与免费歌曲,填写后解锁每日推荐、私人漫游、个人歌单、云盘与黑胶 VIP / 无损音质。": "Optional. Paste a raw MUSIC_U token, full Cookie header, or Copy as cURL; leave empty for public catalog and free songs, or set it to unlock Daily Recommendations, Personal FM, My Library, Cloud Drive, and VIP / Lossless quality.",
1803
+ "可选。支持直接粘贴 MUSIC_U 值、完整 Cookie 请求头或 Copy as cURL;不填可直接使用公开曲库与免费歌曲,填写后解锁每日推荐、历史日推、私人漫游、个人音乐库、动态封面、听歌打卡与黑胶 VIP / 无损音质。": "Optional. Paste a raw MUSIC_U token, full Cookie header, or Copy as cURL; leave empty for public catalog and free songs, or set it to unlock Daily Picks, History Picks, Personal FM, My Library, Motion Artwork, Scrobble, and VIP / Lossless quality.",
1445
1804
  音质偏好: "Audio Quality",
1446
- "无损与 Hi-Res 需要黑胶 VIP / SVIP Cookie,FLAC 在自动模式下优先使用软件解码": "Lossless and Hi-Res require VIP / SVIP Cookie; standalone FLAC automatically prefers software decoder in Auto mode.",
1805
+ "无损与 SVIP 高解析音质需要黑胶 VIP / SVIP Cookie,FLAC 在自动模式下优先使用软件解码": "Lossless and SVIP Hi-Res tiers require VIP / SVIP Cookie; standalone FLAC automatically prefers software decoder in Auto mode.",
1447
1806
  "标准 (128k)": "Standard (128k)",
1448
1807
  "较高 (192k)": "Higher (192k)",
1449
1808
  "极高 (320k,兼容性最佳)": "ExHigh (320k, Best Compatibility)",
1450
1809
  "无损 (FLAC,需 VIP)": "Lossless (FLAC, VIP)",
1451
1810
  "Hi-Res (FLAC,需 SVIP)": "Hi-Res (FLAC, SVIP)",
1811
+ "高清臻音 (SVIP)": "Spatial Audio HD (jyeffect, SVIP)",
1812
+ "沉浸环绕声 (SVIP)": "Immersive Surround (sky, SVIP)",
1813
+ "杜比全景声 (SVIP)": "Dolby Atmos (SVIP)",
1814
+ "臻音全景声 (SVIP)": "Vivid Surround (SVIP)",
1815
+ "超清母带 (SVIP)": "Master Quality (jymaster, SVIP)",
1452
1816
  "VIP 试听片段": "VIP Trial Previews",
1453
1817
  "遇到无完整权限的 VIP 歌曲时,是否允许播放 30 秒试听片段": "Whether to allow playing 30-second trial previews for VIP tracks without full access",
1454
1818
  "跳过试听(仅播放完整歌曲)": "Skip Previews (Full Tracks Only)",
@@ -1457,19 +1821,28 @@ WidgetMetadata = {
1457
1821
  自动: "Auto",
1458
1822
  "系统播放器 (system)": "System Player (system)",
1459
1823
  "软件解码 (app)": "App Decoder (app)",
1824
+ 听歌打卡: "Scrobble Listening History",
1825
+ "填写 Cookie 后,播放歌曲时上报至网易云听歌记录以更新听歌排行与每日推荐": "When Cookie is set, report playback to NetEase to keep your play ranks and recommendations fresh",
1826
+ 关闭: "Off",
1827
+ "开启(需配置 Cookie)": "On (Requires Cookie)",
1460
1828
  首页推荐: "Home",
1461
- "每日推荐、推荐歌单与新歌精选": "Daily recommendations, featured playlists, and new songs",
1829
+ "每日推荐、历史日推、精品歌单与新歌精选": "Daily picks, historical picks, high-quality playlists, and new songs",
1462
1830
  筛选: "Filter",
1463
1831
  全部: "All",
1464
1832
  每日推荐: "Daily Picks",
1833
+ 历史日推: "History Daily Picks",
1834
+ 精品歌单: "High-Quality Playlists",
1465
1835
  歌曲: "Songs",
1466
1836
  歌单: "Playlists",
1467
1837
  页码: "Page",
1468
1838
  排行榜: "Charts",
1469
1839
  官方榜与全球精选榜单: "Official and global music charts",
1840
+ "官方榜、全球精选榜单与歌手榜": "Official charts, global charts, and top artists",
1470
1841
  分类: "Category",
1471
1842
  官方榜: "Official Charts",
1472
1843
  全球榜: "Global Charts",
1844
+ 歌手榜: "Top Artists Chart",
1845
+ 歌手榜地区: "Artist Chart Region",
1473
1846
  新歌速递: "New Releases",
1474
1847
  最新上架专辑与新歌速递: "Newly released albums and singles",
1475
1848
  地区: "Region",
@@ -1479,32 +1852,65 @@ WidgetMetadata = {
1479
1852
  欧美: "Western",
1480
1853
  韩国: "Korean",
1481
1854
  日本: "Japanese",
1855
+ 其他: "Other",
1482
1856
  歌单分类: "Categories",
1483
- "按语种、风格、场景与情感浏览歌单": "Browse playlists by language, genre, mood, and scene",
1857
+ "按语种、风格、曲风馆与精品标签浏览": "Browse by playlist categories, Style Hall, and high-quality tags",
1858
+ 浏览模式: "Browse Mode",
1859
+ 曲风馆: "Style Hall",
1860
+ 精品歌单分类: "High-Quality Tags",
1484
1861
  "分类 ID": "Category ID",
1485
1862
  分区: "Section",
1863
+ "歌单 / 专辑": "Playlists / Albums",
1486
1864
  专辑: "Albums",
1487
1865
  偏移量: "Offset",
1488
1866
  电台与漫游: "Radio & FM",
1489
- "私人漫游、心动模式、私人雷达与榜单电台": "Personal FM, Heart Mode, Private Radar, and chart stations",
1867
+ "私人漫游、场景漫游、跑步漫游、心动模式与榜单电台": "Personal FM, Scene FM, Running FM, Heart Mode, and chart stations",
1490
1868
  "电台 ID": "Radio ID",
1869
+ 播客电台: "Podcasts & Radio",
1870
+ "精选播客、热门电台榜与高人气节目": "Featured podcasts, top radio charts, and popular episodes",
1871
+ 精选播客: "Featured Podcasts",
1872
+ 热门播客: "Popular Podcasts",
1873
+ 热门电台榜: "Top Radios",
1874
+ 新晋电台榜: "Rising Radios",
1875
+ 热门节目榜: "Top Episodes",
1491
1876
  歌手: "Artists",
1492
- 热门歌手与歌手主页: "Popular artists and artist profiles",
1877
+ "热门歌手、分类筛选与歌手主页": "Popular artists, category filters, and artist profiles",
1878
+ 类型: "Type",
1879
+ 男歌手: "Male",
1880
+ 女歌手: "Female",
1881
+ 乐队组合: "Bands & Groups",
1493
1882
  "歌手 ID": "Artist ID",
1494
1883
  歌手分区: "Artist Section",
1495
1884
  资料: "Profile",
1496
1885
  相似歌手: "Similar Artists",
1497
1886
  我的音乐库: "My Library",
1498
- "我喜欢的音乐、个人歌单、音乐云盘与听歌排行(需配置 Cookie)": "Liked songs, playlists, cloud drive, and listening ranks (Requires Cookie)",
1887
+ "我喜欢的音乐、个人歌单、云盘、最近播放与收藏(需配置 Cookie)": "Liked songs, playlists, cloud drive, recent plays, and collections (Requires Cookie)",
1499
1888
  我喜欢的音乐: "Liked Songs",
1500
1889
  我的歌单: "My Playlists",
1501
1890
  音乐云盘: "Cloud Drive",
1891
+ "最近播放 · 歌曲": "Recently Played · Songs",
1892
+ "最近播放 · 专辑": "Recently Played · Albums",
1893
+ "最近播放 · 歌单": "Recently Played · Playlists",
1894
+ 收藏的专辑: "Collected Albums",
1895
+ 关注的歌手: "Followed Artists",
1896
+ 订阅的播客电台: "Subscribed Podcasts",
1502
1897
  最近一周听歌排行: "Weekly Top Played",
1503
1898
  所有时间听歌排行: "All-Time Top Played",
1899
+ 歌词: "Lyrics",
1900
+ "网易云音乐时间轴歌词(双语 / 原文 / 译文 / 罗马音)": "NetEase Cloud Music synced lyrics (Bilingual / Original / Translation / Romaji)",
1901
+ "双语歌词(原文 + 译文)": "Bilingual Lyrics (Original + Translation)",
1902
+ 原文歌词: "Original Lyrics",
1903
+ 中文翻译歌词: "Chinese Translation",
1904
+ 罗马音歌词: "Romaji Lyrics",
1504
1905
  搜索: "Search",
1505
- "搜索歌曲、专辑、歌手与歌单": "Search songs, albums, artists, and playlists",
1906
+ "搜索歌曲、歌词、专辑、歌手、歌单、播客电台与声音(留空展示热搜榜)": "Search songs, lyrics, albums, artists, playlists, podcasts, and episodes (leave empty for Hot Search)",
1907
+ "搜索歌曲、专辑、歌手、歌单与播客电台": "Search songs, albums, artists, playlists, and podcasts",
1506
1908
  结果类型: "Result Type",
1507
1909
  "全部(音乐混合)": "All (Mixed Music)",
1910
+ 按歌词搜歌: "Search by Lyrics",
1911
+ "声音 / 单集": "Voices & Episodes",
1912
+ 热搜: "Trending",
1913
+ 网易云热搜榜: "NetEase Trending Search",
1508
1914
  语种: "Language",
1509
1915
  风格: "Genre",
1510
1916
  主题: "Theme",
@@ -1536,8 +1942,16 @@ WidgetMetadata = {
1536
1942
  "重温你熟悉和喜欢的旋律(需配置 Cookie)": "Revisit familiar favorites (Requires Cookie)",
1537
1943
  "私人漫游 · 探索": "Personal FM · Explore",
1538
1944
  "发现新鲜小众好音乐(需配置 Cookie)": "Discover fresh tracks (Requires Cookie)",
1945
+ "场景漫游 · 运动": "Scene FM · Workout",
1946
+ "高燃节奏伴你运动(需配置 Cookie)": "Energetic beats for workouts (Requires Cookie)",
1947
+ "场景漫游 · 专注": "Scene FM · Focus",
1948
+ "沉浸工作与学习氛围(需配置 Cookie)": "Deep focus atmosphere for work and study (Requires Cookie)",
1949
+ "场景漫游 · 深夜情绪": "Scene FM · Late Night",
1950
+ "治愈深夜情绪的私藏歌单(需配置 Cookie)": "Soothing late-night mood mix (Requires Cookie)",
1539
1951
  心动模式: "Heart Mode",
1540
1952
  "以我喜欢的音乐为种子智能推荐(需配置 Cookie)": "Smart mix seeded from your liked songs (Requires Cookie)",
1953
+ 跑步漫游: "Running FM",
1954
+ "按 160 BPM 步频推荐的动感节奏": "Upbeat 160 BPM tracks for running",
1541
1955
  私人雷达: "Private Radar",
1542
1956
  每日更新的个性化精选电台: "Daily updated personalized radar station",
1543
1957
  首歌曲: "songs",
@@ -1562,16 +1976,21 @@ WidgetMetadata = {
1562
1976
  "zh-Hant": {
1563
1977
  网易云音乐: "網易雲音樂",
1564
1978
  "网易云音乐 (测试)": "網易雲音樂 (測試)",
1565
- "网易云音乐插件,支持首页推荐、排行榜、新歌速递、歌单分类、私人漫游、歌手主页、搜索、个人音乐库与直接音频播放": "網易雲音樂插件,支援首頁推薦、排行榜、新歌速遞、歌單分類、私人漫遊、歌手主頁、搜尋、個人音樂庫與直接音訊播放",
1979
+ "网易云音乐插件,支持首页推荐、精品歌单、排行榜、新歌速递、歌单分类与曲风馆、播客电台、私人与场景漫游、歌手主页、搜索、时间轴歌词、个人音乐库与高解析音频播放": "網易雲音樂插件,支援首頁推薦、精品歌單、排行榜、新歌速遞、歌單分類與曲風館、播客電台、私人與場景漫遊、歌手主頁、搜尋、時間軸歌詞、個人音樂庫與高解析音訊播放",
1566
1980
  "网易云音乐 Cookie(可选)": "網易雲音樂 Cookie(選填)",
1567
- "可选。支持直接粘贴 MUSIC_U 值、完整 Cookie 请求头或 Copy as cURL;不填可直接使用公开曲库与免费歌曲,填写后解锁每日推荐、私人漫游、个人歌单、云盘与黑胶 VIP / 无损音质。": "選填。支援直接貼上 MUSIC_U 值、完整 Cookie 請求標頭或 Copy as cURL;不填可直接使用公開曲庫與免費歌曲,填寫後解鎖每日推薦、私人漫遊、個人歌單、雲端硬碟與黑膠 VIP / 無損音質。",
1981
+ "可选。支持直接粘贴 MUSIC_U 值、完整 Cookie 请求头或 Copy as cURL;不填可直接使用公开曲库与免费歌曲,填写后解锁每日推荐、历史日推、私人漫游、个人音乐库、动态封面、听歌打卡与黑胶 VIP / 无损音质。": "選填。支援直接貼上 MUSIC_U 值、完整 Cookie 請求標頭或 Copy as cURL;不填可直接使用公開曲庫與免費歌曲,填寫後解鎖每日推薦、歷史日推、私人漫遊、個人音樂庫、動態封面、聽歌打卡與黑膠 VIP / 無損音質。",
1568
1982
  音质偏好: "音質偏好",
1569
- "无损与 Hi-Res 需要黑胶 VIP / SVIP Cookie,FLAC 在自动模式下优先使用软件解码": "無損與 Hi-Res 需要黑膠 VIP / SVIP Cookie,FLAC 在自動模式下優先使用軟體解碼",
1983
+ "无损与 SVIP 高解析音质需要黑胶 VIP / SVIP Cookie,FLAC 在自动模式下优先使用软件解码": "無損與 SVIP 高解析音質需要黑膠 VIP / SVIP Cookie,FLAC 在自動模式下優先使用軟體解碼",
1570
1984
  "标准 (128k)": "標準 (128k)",
1571
1985
  "较高 (192k)": "較高 (192k)",
1572
1986
  "极高 (320k,兼容性最佳)": "極高 (320k,相容性最佳)",
1573
1987
  "无损 (FLAC,需 VIP)": "無損 (FLAC,需 VIP)",
1574
1988
  "Hi-Res (FLAC,需 SVIP)": "Hi-Res (FLAC,需 SVIP)",
1989
+ "高清臻音 (SVIP)": "高清臻音 (SVIP)",
1990
+ "沉浸环绕声 (SVIP)": "沉浸環繞聲 (SVIP)",
1991
+ "杜比全景声 (SVIP)": "杜比全景聲 (SVIP)",
1992
+ "臻音全景声 (SVIP)": "臻音全景聲 (SVIP)",
1993
+ "超清母带 (SVIP)": "超清母帶 (SVIP)",
1575
1994
  "VIP 试听片段": "VIP 試聽片段",
1576
1995
  "遇到无完整权限的 VIP 歌曲时,是否允许播放 30 秒试听片段": "遇到無完整權限的 VIP 歌曲時,是否允許播放 30 秒試聽片段",
1577
1996
  "跳过试听(仅播放完整歌曲)": "略過試聽(僅播放完整歌曲)",
@@ -1580,19 +1999,28 @@ WidgetMetadata = {
1580
1999
  自动: "自動",
1581
2000
  "系统播放器 (system)": "系統播放器 (system)",
1582
2001
  "软件解码 (app)": "軟體解碼 (app)",
2002
+ 听歌打卡: "聽歌打卡",
2003
+ "填写 Cookie 后,播放歌曲时上报至网易云听歌记录以更新听歌排行与每日推荐": "填寫 Cookie 後,播放歌曲時上報至網易雲聽歌記錄以更新聽歌排行與每日推薦",
2004
+ 关闭: "關閉",
2005
+ "开启(需配置 Cookie)": "開啟(需設定 Cookie)",
1583
2006
  首页推荐: "首頁推薦",
1584
- "每日推荐、推荐歌单与新歌精选": "每日推薦、推薦歌單與新歌精選",
2007
+ "每日推荐、历史日推、精品歌单与新歌精选": "每日推薦、歷史日推、精品歌單與新歌精選",
1585
2008
  筛选: "篩選",
1586
2009
  全部: "全部",
1587
2010
  每日推荐: "每日推薦",
2011
+ 历史日推: "歷史日推",
2012
+ 精品歌单: "精品歌單",
1588
2013
  歌曲: "歌曲",
1589
2014
  歌单: "歌單",
1590
2015
  页码: "頁碼",
1591
2016
  排行榜: "排行榜",
1592
2017
  官方榜与全球精选榜单: "官方榜與全球精選榜單",
2018
+ "官方榜、全球精选榜单与歌手榜": "官方榜、全球精選榜單與歌手榜",
1593
2019
  分类: "分類",
1594
2020
  官方榜: "官方榜",
1595
2021
  全球榜: "全球榜",
2022
+ 歌手榜: "歌手榜",
2023
+ 歌手榜地区: "歌手榜地區",
1596
2024
  新歌速递: "新歌速遞",
1597
2025
  最新上架专辑与新歌速递: "最新上架專輯與新歌速遞",
1598
2026
  地区: "地區",
@@ -1602,32 +2030,65 @@ WidgetMetadata = {
1602
2030
  欧美: "歐美",
1603
2031
  韩国: "韓國",
1604
2032
  日本: "日本",
2033
+ 其他: "其他",
1605
2034
  歌单分类: "歌單分類",
1606
- "按语种、风格、场景与情感浏览歌单": "按語種、風格、場景與情感瀏覽歌單",
2035
+ "按语种、风格、曲风馆与精品标签浏览": "按語種、風格、曲風館與精品標籤瀏覽",
2036
+ 浏览模式: "瀏覽模式",
2037
+ 曲风馆: "曲風館",
2038
+ 精品歌单分类: "精品歌單分類",
1607
2039
  "分类 ID": "分類 ID",
1608
2040
  分区: "分區",
2041
+ "歌单 / 专辑": "歌單 / 專輯",
1609
2042
  专辑: "專輯",
1610
2043
  偏移量: "偏移量",
1611
2044
  电台与漫游: "電台與漫遊",
1612
- "私人漫游、心动模式、私人雷达与榜单电台": "私人漫遊、心動模式、私人雷達與榜單電台",
2045
+ "私人漫游、场景漫游、跑步漫游、心动模式与榜单电台": "私人漫遊、場景漫遊、跑步漫遊、心動模式與榜單電台",
1613
2046
  "电台 ID": "電台 ID",
2047
+ 播客电台: "播客電台",
2048
+ "精选播客、热门电台榜与高人气节目": "精選播客、熱門電台榜與高人氣節目",
2049
+ 精选播客: "精選播客",
2050
+ 热门播客: "熱門播客",
2051
+ 热门电台榜: "熱門電台榜",
2052
+ 新晋电台榜: "新晉電台榜",
2053
+ 热门节目榜: "熱門節目榜",
1614
2054
  歌手: "歌手",
1615
- 热门歌手与歌手主页: "熱門歌手與歌手主頁",
2055
+ "热门歌手、分类筛选与歌手主页": "熱門歌手、分類篩選與歌手主頁",
2056
+ 类型: "類型",
2057
+ 男歌手: "男歌手",
2058
+ 女歌手: "女歌手",
2059
+ 乐队组合: "樂團組合",
1616
2060
  "歌手 ID": "歌手 ID",
1617
2061
  歌手分区: "歌手分區",
1618
2062
  资料: "資料",
1619
2063
  相似歌手: "相似歌手",
1620
2064
  我的音乐库: "我的音樂庫",
1621
- "我喜欢的音乐、个人歌单、音乐云盘与听歌排行(需配置 Cookie)": "我喜歡的音樂、個人歌單、音樂雲端硬碟與聽歌排行(需設定 Cookie)",
2065
+ "我喜欢的音乐、个人歌单、云盘、最近播放与收藏(需配置 Cookie)": "我喜歡的音樂、個人歌單、雲端硬碟、最近播放與收藏(需設定 Cookie)",
1622
2066
  我喜欢的音乐: "我喜歡的音樂",
1623
2067
  我的歌单: "我的歌單",
1624
2068
  音乐云盘: "音樂雲端硬碟",
2069
+ "最近播放 · 歌曲": "最近播放 · 歌曲",
2070
+ "最近播放 · 专辑": "最近播放 · 專輯",
2071
+ "最近播放 · 歌单": "最近播放 · 歌單",
2072
+ 收藏的专辑: "收藏的專輯",
2073
+ 关注的歌手: "關注的歌手",
2074
+ 订阅的播客电台: "訂閱的播客電台",
1625
2075
  最近一周听歌排行: "最近一週聽歌排行",
1626
2076
  所有时间听歌排行: "所有時間聽歌排行",
2077
+ 歌词: "歌詞",
2078
+ "网易云音乐时间轴歌词(双语 / 原文 / 译文 / 罗马音)": "網易雲音樂時間軸歌詞(雙語 / 原文 / 譯文 / 羅馬音)",
2079
+ "双语歌词(原文 + 译文)": "雙語歌詞(原文 + 譯文)",
2080
+ 原文歌词: "原文歌詞",
2081
+ 中文翻译歌词: "中文翻譯歌詞",
2082
+ 罗马音歌词: "羅馬音歌詞",
1627
2083
  搜索: "搜尋",
1628
- "搜索歌曲、专辑、歌手与歌单": "搜尋歌曲、專輯、歌手與歌單",
2084
+ "搜索歌曲、歌词、专辑、歌手、歌单、播客电台与声音(留空展示热搜榜)": "搜尋歌曲、歌詞、專輯、歌手、歌單、播客電台與聲音(留空顯示熱搜榜)",
2085
+ "搜索歌曲、专辑、歌手、歌单与播客电台": "搜尋歌曲、專輯、歌手、歌單與播客電台",
1629
2086
  结果类型: "結果類型",
1630
2087
  "全部(音乐混合)": "全部(音樂混合)",
2088
+ 按歌词搜歌: "按歌詞搜歌",
2089
+ "声音 / 单集": "聲音 / 單集",
2090
+ 热搜: "熱搜",
2091
+ 网易云热搜榜: "網易雲熱搜榜",
1631
2092
  语种: "語種",
1632
2093
  风格: "風格",
1633
2094
  主题: "主題",
@@ -1659,8 +2120,16 @@ WidgetMetadata = {
1659
2120
  "重温你熟悉和喜欢的旋律(需配置 Cookie)": "重溫你熟悉和喜歡的旋律(需設定 Cookie)",
1660
2121
  "私人漫游 · 探索": "私人漫遊 · 探索",
1661
2122
  "发现新鲜小众好音乐(需配置 Cookie)": "發現新鮮小眾好音樂(需設定 Cookie)",
2123
+ "场景漫游 · 运动": "場景漫遊 · 運動",
2124
+ "高燃节奏伴你运动(需配置 Cookie)": "高燃節奏伴你運動(需設定 Cookie)",
2125
+ "场景漫游 · 专注": "場景漫遊 · 專注",
2126
+ "沉浸工作与学习氛围(需配置 Cookie)": "沉浸工作與學習氛圍(需設定 Cookie)",
2127
+ "场景漫游 · 深夜情绪": "場景漫遊 · 深夜情緒",
2128
+ "治愈深夜情绪的私藏歌单(需配置 Cookie)": "治癒深夜情緒的私藏歌單(需設定 Cookie)",
1662
2129
  心动模式: "心動模式",
1663
2130
  "以我喜欢的音乐为种子智能推荐(需配置 Cookie)": "以我喜歡的音樂為種子智慧推薦(需設定 Cookie)",
2131
+ 跑步漫游: "跑步漫遊",
2132
+ "按 160 BPM 步频推荐的动感节奏": "按 160 BPM 步頻推薦的動感節奏",
1664
2133
  私人雷达: "私人雷達",
1665
2134
  每日更新的个性化精选电台: "每日更新的個人化精選電台",
1666
2135
  首歌曲: "首歌曲",
@@ -1687,14 +2156,14 @@ WidgetMetadata = {
1687
2156
  {
1688
2157
  name: "cookie",
1689
2158
  title: "网易云音乐 Cookie(可选)",
1690
- description: "可选。支持直接粘贴 MUSIC_U 值、完整 Cookie 请求头或 Copy as cURL;不填可直接使用公开曲库与免费歌曲,填写后解锁每日推荐、私人漫游、个人歌单、云盘与黑胶 VIP / 无损音质。",
2159
+ description: "可选。支持直接粘贴 MUSIC_U 值、完整 Cookie 请求头或 Copy as cURL;不填可直接使用公开曲库与免费歌曲,填写后解锁每日推荐、历史日推、私人漫游、个人音乐库、动态封面、听歌打卡与黑胶 VIP / 无损音质。",
1691
2160
  type: "input",
1692
2161
  value: ""
1693
2162
  },
1694
2163
  {
1695
2164
  name: "quality",
1696
2165
  title: "音质偏好",
1697
- description: "无损与 Hi-Res 需要黑胶 VIP / SVIP Cookie,FLAC 在自动模式下优先使用软件解码",
2166
+ description: "无损与 SVIP 高解析音质需要黑胶 VIP / SVIP Cookie,FLAC 在自动模式下优先使用软件解码",
1698
2167
  type: "enumeration",
1699
2168
  value: "exhigh",
1700
2169
  enumOptions: [
@@ -1717,6 +2186,26 @@ WidgetMetadata = {
1717
2186
  {
1718
2187
  title: "Hi-Res (FLAC,需 SVIP)",
1719
2188
  value: "hires"
2189
+ },
2190
+ {
2191
+ title: "高清臻音 (SVIP)",
2192
+ value: "jyeffect"
2193
+ },
2194
+ {
2195
+ title: "沉浸环绕声 (SVIP)",
2196
+ value: "sky"
2197
+ },
2198
+ {
2199
+ title: "杜比全景声 (SVIP)",
2200
+ value: "dolby"
2201
+ },
2202
+ {
2203
+ title: "臻音全景声 (SVIP)",
2204
+ value: "vivid"
2205
+ },
2206
+ {
2207
+ title: "超清母带 (SVIP)",
2208
+ value: "jymaster"
1720
2209
  }
1721
2210
  ]
1722
2211
  },
@@ -1756,13 +2245,30 @@ WidgetMetadata = {
1756
2245
  value: "app"
1757
2246
  }
1758
2247
  ]
2248
+ },
2249
+ {
2250
+ name: "reportHistory",
2251
+ title: "听歌打卡",
2252
+ description: "填写 Cookie 后,播放歌曲时上报至网易云听歌记录以更新听歌排行与每日推荐",
2253
+ type: "enumeration",
2254
+ value: "false",
2255
+ enumOptions: [
2256
+ {
2257
+ title: "关闭",
2258
+ value: "false"
2259
+ },
2260
+ {
2261
+ title: "开启(需配置 Cookie)",
2262
+ value: "true"
2263
+ }
2264
+ ]
1759
2265
  }
1760
2266
  ],
1761
2267
  modules: [
1762
2268
  {
1763
2269
  id: "home",
1764
2270
  title: "首页推荐",
1765
- subtitle: "每日推荐、推荐歌单与新歌精选",
2271
+ subtitle: "每日推荐、历史日推、精品歌单与新歌精选",
1766
2272
  type: "video",
1767
2273
  functionName: "loadHome",
1768
2274
  cacheDuration: 600,
@@ -1781,6 +2287,14 @@ WidgetMetadata = {
1781
2287
  title: "每日推荐",
1782
2288
  value: "daily"
1783
2289
  },
2290
+ {
2291
+ title: "历史日推",
2292
+ value: "history_daily"
2293
+ },
2294
+ {
2295
+ title: "精品歌单",
2296
+ value: "highquality"
2297
+ },
1784
2298
  {
1785
2299
  title: "歌曲",
1786
2300
  value: "songs"
@@ -1801,7 +2315,7 @@ WidgetMetadata = {
1801
2315
  {
1802
2316
  id: "charts",
1803
2317
  title: "排行榜",
1804
- subtitle: "官方榜与全球精选榜单",
2318
+ subtitle: "官方榜、全球精选榜单与歌手榜",
1805
2319
  type: "video",
1806
2320
  functionName: "loadCharts",
1807
2321
  cacheDuration: 3600,
@@ -1823,6 +2337,40 @@ WidgetMetadata = {
1823
2337
  {
1824
2338
  title: "全球榜",
1825
2339
  value: "global"
2340
+ },
2341
+ {
2342
+ title: "歌手榜",
2343
+ value: "artists"
2344
+ }
2345
+ ]
2346
+ },
2347
+ {
2348
+ name: "artistArea",
2349
+ title: "歌手榜地区",
2350
+ type: "enumeration",
2351
+ value: "ZH",
2352
+ belongTo: {
2353
+ paramName: "category",
2354
+ value: [
2355
+ "artists"
2356
+ ]
2357
+ },
2358
+ enumOptions: [
2359
+ {
2360
+ title: "华语",
2361
+ value: "ZH"
2362
+ },
2363
+ {
2364
+ title: "欧美",
2365
+ value: "EA"
2366
+ },
2367
+ {
2368
+ title: "韩国",
2369
+ value: "KR"
2370
+ },
2371
+ {
2372
+ title: "日本",
2373
+ value: "JP"
1826
2374
  }
1827
2375
  ]
1828
2376
  },
@@ -1895,11 +2443,31 @@ WidgetMetadata = {
1895
2443
  {
1896
2444
  id: "musicGenres",
1897
2445
  title: "歌单分类",
1898
- subtitle: "按语种、风格、场景与情感浏览歌单",
2446
+ subtitle: "按语种、风格、曲风馆与精品标签浏览",
1899
2447
  type: "video",
1900
2448
  functionName: "loadGenres",
1901
2449
  cacheDuration: 3600,
1902
2450
  params: [
2451
+ {
2452
+ name: "source",
2453
+ title: "浏览模式",
2454
+ type: "enumeration",
2455
+ value: "all",
2456
+ enumOptions: [
2457
+ {
2458
+ title: "歌单分类",
2459
+ value: "all"
2460
+ },
2461
+ {
2462
+ title: "曲风馆",
2463
+ value: "styles"
2464
+ },
2465
+ {
2466
+ title: "精品歌单分类",
2467
+ value: "highquality"
2468
+ }
2469
+ ]
2470
+ },
1903
2471
  {
1904
2472
  name: "genreId",
1905
2473
  title: "分类 ID",
@@ -1911,12 +2479,16 @@ WidgetMetadata = {
1911
2479
  type: "enumeration",
1912
2480
  enumOptions: [
1913
2481
  {
1914
- title: "歌单",
2482
+ title: "歌单 / 专辑",
1915
2483
  value: "albums"
1916
2484
  },
1917
2485
  {
1918
2486
  title: "歌曲",
1919
2487
  value: "songs"
2488
+ },
2489
+ {
2490
+ title: "歌手",
2491
+ value: "artists"
1920
2492
  }
1921
2493
  ]
1922
2494
  },
@@ -1935,7 +2507,7 @@ WidgetMetadata = {
1935
2507
  {
1936
2508
  id: "musicRadios",
1937
2509
  title: "电台与漫游",
1938
- subtitle: "私人漫游、心动模式、私人雷达与榜单电台",
2510
+ subtitle: "私人漫游、场景漫游、跑步漫游、心动模式与榜单电台",
1939
2511
  type: "video",
1940
2512
  functionName: "loadRadios",
1941
2513
  cacheDuration: 300,
@@ -1976,14 +2548,113 @@ WidgetMetadata = {
1976
2548
  }
1977
2549
  ]
1978
2550
  },
2551
+ {
2552
+ id: "podcasts",
2553
+ title: "播客电台",
2554
+ subtitle: "精选播客、热门电台榜与高人气节目",
2555
+ type: "video",
2556
+ functionName: "loadPodcasts",
2557
+ cacheDuration: 1800,
2558
+ params: [
2559
+ {
2560
+ name: "category",
2561
+ title: "分类",
2562
+ type: "enumeration",
2563
+ value: "recommend",
2564
+ enumOptions: [
2565
+ {
2566
+ title: "精选播客",
2567
+ value: "recommend"
2568
+ },
2569
+ {
2570
+ title: "热门播客",
2571
+ value: "hot"
2572
+ },
2573
+ {
2574
+ title: "热门电台榜",
2575
+ value: "toplist_hot"
2576
+ },
2577
+ {
2578
+ title: "新晋电台榜",
2579
+ value: "toplist_new"
2580
+ },
2581
+ {
2582
+ title: "热门节目榜",
2583
+ value: "programs"
2584
+ }
2585
+ ]
2586
+ },
2587
+ {
2588
+ name: "page",
2589
+ title: "页码",
2590
+ type: "page"
2591
+ }
2592
+ ]
2593
+ },
1979
2594
  {
1980
2595
  id: "musicArtists",
1981
2596
  title: "歌手",
1982
- subtitle: "热门歌手与歌手主页",
2597
+ subtitle: "热门歌手、分类筛选与歌手主页",
1983
2598
  type: "person",
1984
2599
  functionName: "loadArtists",
1985
2600
  cacheDuration: 3600,
1986
2601
  params: [
2602
+ {
2603
+ name: "area",
2604
+ title: "地区",
2605
+ type: "enumeration",
2606
+ value: "ALL",
2607
+ enumOptions: [
2608
+ {
2609
+ title: "全部",
2610
+ value: "ALL"
2611
+ },
2612
+ {
2613
+ title: "华语",
2614
+ value: "ZH"
2615
+ },
2616
+ {
2617
+ title: "欧美",
2618
+ value: "EA"
2619
+ },
2620
+ {
2621
+ title: "日本",
2622
+ value: "JP"
2623
+ },
2624
+ {
2625
+ title: "韩国",
2626
+ value: "KR"
2627
+ },
2628
+ {
2629
+ title: "其他",
2630
+ value: "OTHER"
2631
+ }
2632
+ ]
2633
+ },
2634
+ {
2635
+ name: "artistType",
2636
+ title: "类型",
2637
+ type: "enumeration",
2638
+ value: "ALL",
2639
+ enumOptions: [
2640
+ {
2641
+ title: "全部",
2642
+ value: "ALL"
2643
+ },
2644
+ {
2645
+ title: "男歌手",
2646
+ value: "MALE"
2647
+ },
2648
+ {
2649
+ title: "女歌手",
2650
+ value: "FEMALE"
2651
+ },
2652
+ {
2653
+ title: "乐队组合",
2654
+ value: "BAND"
2655
+ }
2656
+ ]
2657
+ },
1987
2658
  {
1988
2659
  name: "peopleId",
1989
2660
  title: "歌手 ID",
@@ -2027,7 +2698,7 @@ WidgetMetadata = {
2027
2698
  {
2028
2699
  id: "library",
2029
2700
  title: "我的音乐库",
2030
- subtitle: "我喜欢的音乐、个人歌单、音乐云盘与听歌排行(需配置 Cookie)",
2701
+ subtitle: "我喜欢的音乐、个人歌单、云盘、最近播放与收藏(需配置 Cookie)",
2031
2702
  type: "video",
2032
2703
  functionName: "loadLibrary",
2033
2704
  cacheDuration: 120,
@@ -2050,6 +2721,30 @@ WidgetMetadata = {
2050
2721
  title: "音乐云盘",
2051
2722
  value: "cloud"
2052
2723
  },
2724
+ {
2725
+ title: "最近播放 · 歌曲",
2726
+ value: "recent_songs"
2727
+ },
2728
+ {
2729
+ title: "最近播放 · 专辑",
2730
+ value: "recent_albums"
2731
+ },
2732
+ {
2733
+ title: "最近播放 · 歌单",
2734
+ value: "recent_playlists"
2735
+ },
2736
+ {
2737
+ title: "收藏的专辑",
2738
+ value: "sub_albums"
2739
+ },
2740
+ {
2741
+ title: "关注的歌手",
2742
+ value: "sub_artists"
2743
+ },
2744
+ {
2745
+ title: "订阅的播客电台",
2746
+ value: "sub_podcasts"
2747
+ },
2053
2748
  {
2054
2749
  title: "最近一周听歌排行",
2055
2750
  value: "recent_week"
@@ -2066,12 +2761,20 @@ WidgetMetadata = {
2066
2761
  type: "page"
2067
2762
  }
2068
2763
  ]
2764
+ },
2765
+ {
2766
+ id: "loadSubtitle",
2767
+ title: "歌词",
2768
+ subtitle: "网易云音乐时间轴歌词(双语 / 原文 / 译文 / 罗马音)",
2769
+ type: "subtitle",
2770
+ functionName: "loadSubtitle",
2771
+ cacheDuration: 3600
2069
2772
  }
2070
2773
  ],
2071
2774
  search: {
2072
2775
  id: "search",
2073
2776
  title: "搜索",
2074
- subtitle: "搜索歌曲、专辑、歌手与歌单",
2777
+ subtitle: "搜索歌曲、歌词、专辑、歌手、歌单、播客电台与声音(留空展示热搜榜)",
2075
2778
  functionName: "search",
2076
2779
  params: [
2077
2780
  {
@@ -2088,6 +2791,10 @@ WidgetMetadata = {
2088
2791
  title: "歌曲",
2089
2792
  value: "songs"
2090
2793
  },
2794
+ {
2795
+ title: "按歌词搜歌",
2796
+ value: "lyrics"
2797
+ },
2091
2798
  {
2092
2799
  title: "专辑",
2093
2800
  value: "albums"
@@ -2099,6 +2806,14 @@ WidgetMetadata = {
2099
2806
  {
2100
2807
  title: "歌单",
2101
2808
  value: "playlists"
2809
+ },
2810
+ {
2811
+ title: "播客电台",
2812
+ value: "dj"
2813
+ },
2814
+ {
2815
+ title: "声音 / 单集",
2816
+ value: "voices"
2102
2817
  }
2103
2818
  ]
2104
2819
  },
@@ -2109,113 +2824,225 @@ WidgetMetadata = {
2109
2824
  }
2110
2825
  ]
2111
2826
  }
2112
- }, loadHome = (e)=>ex(function*() {
2113
- return eT(function*() {
2114
- var t, i, r, n, a;
2115
- let o = es(e), s = e.filter || "all", u = l(o.cookie).hasMusicU;
2116
- if ("daily" === s) {
2117
- let t = yield eS("/api/v3/discovery/recommend/songs", {}, o), i = G((Array.isArray(null == (a = t.data) ? void 0 : a.dailySongs) ? t.data.dailySongs : []).map(V).filter((e)=>null !== e).map(H));
2118
- return ec(i), eR(i, e);
2827
+ }, loadHome = (e)=>tl(function*() {
2828
+ return e0(function*() {
2829
+ var t, i, l, a, n, o, s;
2830
+ let u = ew(e), d = e.filter || "all", c = r(u.cookie).hasMusicU;
2831
+ if ("daily" === d) {
2832
+ let t = yield eq("/api/v3/discovery/recommend/songs", {}, u), i = (Array.isArray(null == (n = t.data) ? void 0 : n.dailySongs) ? t.data.dailySongs : []).map(ee).filter((e)=>null !== e), l = ep(i.map(en));
2833
+ return e4(i, l), e8(l, e);
2834
+ }
2835
+ if ("history_daily" === d) {
2836
+ if (!c) throw Error(Widget.i18n("请在模块设置中填写包含 MUSIC_U 的网易云音乐 Cookie 后查看个人内容"));
2837
+ let t = yield eB("/api/discovery/recommend/songs/history/recent", {}, u), i = (Array.isArray(null == (o = t.data) ? void 0 : o.dates) ? t.data.dates.filter(Boolean) : [])[0];
2838
+ if (!i) return [];
2839
+ let l = yield eB("/api/discovery/recommend/songs/history/detail", {
2840
+ date: i
2841
+ }, u), r = (Array.isArray(null == (s = l.data) ? void 0 : s.songs) ? l.data.songs : []).map(ee).filter((e)=>null !== e), a = ep(r.map(en));
2842
+ return e4(r, a), e8(a, e);
2119
2843
  }
2120
- let d = {};
2121
- ("all" === s || "songs" === s) && (u && (d.dailySongs = eS("/api/v3/discovery/recommend/songs", {}, o).then((e)=>{
2844
+ if ("highquality" === d) {
2845
+ let t = yield eB("/api/playlist/highquality/list", {
2846
+ cat: "全部",
2847
+ limit: 60,
2848
+ lasttime: 0,
2849
+ total: !0
2850
+ }, u);
2851
+ return e8(ep((Array.isArray(t.playlists) ? t.playlists : []).map(Y).filter((e)=>null !== e).map(es)), e);
2852
+ }
2853
+ let p = {};
2854
+ ("all" === d || "songs" === d) && (c && (p.dailySongs = eq("/api/v3/discovery/recommend/songs", {}, u).then((e)=>{
2122
2855
  var t;
2123
- return (Array.isArray(null == (t = e.data) ? void 0 : t.dailySongs) ? e.data.dailySongs : []).map(V).filter((e)=>null !== e);
2124
- })), d.newSongs = eS("/api/personalized/newsong", {
2856
+ return (Array.isArray(null == (t = e.data) ? void 0 : t.dailySongs) ? e.data.dailySongs : []).map(ee).filter((e)=>null !== e);
2857
+ })), p.newSongs = eq("/api/personalized/newsong", {
2125
2858
  limit: 20
2126
- }, o).then((e)=>(Array.isArray(e.result) ? e.result : []).map(V).filter((e)=>null !== e))), ("all" === s || "playlists" === s) && (u && (d.dailyPlaylists = eS("/api/v1/discovery/recommend/resource", {}, o).then((e)=>(Array.isArray(e.recommend) ? e.recommend : []).map(x).filter((e)=>null !== e))), d.recommendedPlaylists = eS("/api/personalized/playlist", {
2859
+ }, u).then((e)=>(Array.isArray(e.result) ? e.result : []).map(ee).filter((e)=>null !== e))), ("all" === d || "playlists" === d) && (c && (p.dailyPlaylists = eq("/api/v1/discovery/recommend/resource", {}, u).then((e)=>(Array.isArray(e.recommend) ? e.recommend : []).map(Y).filter((e)=>null !== e))), p.recommendedPlaylists = eq("/api/personalized/playlist", {
2127
2860
  limit: 30
2128
- }, o).then((e)=>(Array.isArray(e.result) ? e.result : []).map(x).filter((e)=>null !== e)));
2129
- let [c, p, f, m] = yield Promise.allSettled([
2130
- null != (t = d.dailySongs) ? t : Promise.resolve([]),
2131
- null != (i = d.dailyPlaylists) ? i : Promise.resolve([]),
2132
- null != (r = d.recommendedPlaylists) ? r : Promise.resolve([]),
2133
- null != (n = d.newSongs) ? n : Promise.resolve([])
2134
- ]), y = [];
2135
- if ("fulfilled" === c.status) for (let e of c.value)y.push(H(e));
2136
- if ("fulfilled" === p.status) for (let e of p.value)y.push(B(e));
2137
- if ("fulfilled" === f.status) for (let e of f.value)y.push(B(e));
2138
- if ("fulfilled" === m.status) for (let e of m.value)y.push(H(e));
2139
- if (!y.length) {
2861
+ }, u).then((e)=>(Array.isArray(e.result) ? e.result : []).map(Y).filter((e)=>null !== e)));
2862
+ let [f, m, y, g] = yield Promise.allSettled([
2863
+ null != (t = p.dailySongs) ? t : Promise.resolve([]),
2864
+ null != (i = p.dailyPlaylists) ? i : Promise.resolve([]),
2865
+ null != (l = p.recommendedPlaylists) ? l : Promise.resolve([]),
2866
+ null != (a = p.newSongs) ? a : Promise.resolve([])
2867
+ ]), v = [], h = [];
2868
+ if ("fulfilled" === f.status) for (let e of f.value)h.push(e), v.push(en(e));
2869
+ if ("fulfilled" === m.status) for (let e of m.value)v.push(es(e));
2870
+ if ("fulfilled" === y.status) for (let e of y.value)v.push(es(e));
2871
+ if ("fulfilled" === g.status) for (let e of g.value)h.push(e), v.push(en(e));
2872
+ if (!v.length) {
2140
2873
  let e = [
2141
- c,
2142
- p,
2143
2874
  f,
2144
- m
2875
+ m,
2876
+ y,
2877
+ g
2145
2878
  ].find((e)=>"rejected" === e.status);
2146
2879
  if ((null == e ? void 0 : e.status) === "rejected") throw e.reason;
2147
2880
  }
2148
- let g = G(y);
2149
- return ec(g), eR(g, e);
2881
+ let b = ep(v);
2882
+ return e4(h, b), e8(b, e);
2150
2883
  })();
2151
- })(), loadCharts = (e)=>ex(function*() {
2152
- return eT(function*() {
2153
- let t = es(e), i = e.category || "all", r = yield eS("/api/toplist/detail", {}, t);
2154
- return eR(G((Array.isArray(r.list) ? r.list : []).filter((e)=>{
2884
+ })(), loadCharts = (e)=>tl(function*() {
2885
+ return e0(function*() {
2886
+ let t = ew(e), i = e.category || "all";
2887
+ if ("artists" === i) {
2888
+ var l;
2889
+ let i = h["EA" === e.artistArea || "KR" === e.artistArea || "JP" === e.artistArea ? e.artistArea : "ZH"], r = yield eB("/api/toplist/artist", {
2890
+ type: i,
2891
+ limit: 100,
2892
+ offset: 0,
2893
+ total: !0
2894
+ }, t);
2895
+ return e8(ep((Array.isArray(null == (l = r.list) ? void 0 : l.artists) ? r.list.artists : []).map(X).filter((e)=>null !== e && !!e.id).map((e)=>ec(e))), e);
2896
+ }
2897
+ let r = yield eq("/api/toplist/detail", {}, t);
2898
+ return e8(ep((Array.isArray(r.list) ? r.list : []).filter((e)=>{
2155
2899
  let t = "string" == typeof e.ToplistType && e.ToplistType.length > 0;
2156
2900
  return "official" === i ? t : "global" !== i || !t;
2157
- }).map(x).filter((e)=>null !== e).map(B)), e);
2901
+ }).map(Y).filter((e)=>null !== e).map(es)), e);
2158
2902
  })();
2159
- })(), loadNewReleases = (e)=>ex(function*() {
2160
- return eT(function*() {
2903
+ })(), loadNewReleases = (e)=>tl(function*() {
2904
+ return e0(function*() {
2161
2905
  var t;
2162
- let i = es(e), r = e.category || "albums", l = "ZH" === (t = e.area) || "EA" === t || "KR" === t || "JP" === t ? t : "ALL", n = eN(e);
2163
- if ("songs" === r) {
2164
- let e = p[l], t = yield eS("/api/v1/discovery/new/songs", {
2906
+ let i = ew(e), l = e.category || "albums", r = "ZH" === (t = e.area) || "EA" === t || "KR" === t || "JP" === t ? t : "ALL", a = e6(e);
2907
+ if ("songs" === l) {
2908
+ let e = y[r], t = yield eq("/api/v1/discovery/new/songs", {
2165
2909
  areaId: e,
2166
2910
  total: !0
2167
2911
  }, i, {
2168
2912
  method: "POST"
2169
- }), r = G((Array.isArray(t.data) ? t.data : []).map(V).filter((e)=>null !== e).map(H));
2170
- return ec(r), r.slice(n, n + 30);
2913
+ }), l = (Array.isArray(t.data) ? t.data : []).map(ee).filter((e)=>null !== e), n = ep(l.map(en));
2914
+ return e4(l, n), n.slice(a, a + 30);
2171
2915
  }
2172
- let a = yield eS("/api/album/new", {
2173
- area: l,
2916
+ let n = yield eq("/api/album/new", {
2917
+ area: r,
2174
2918
  limit: 30,
2175
- offset: n
2919
+ offset: a
2176
2920
  }, i);
2177
- return G((Array.isArray(a.albums) ? a.albums : []).map(_).filter((e)=>null !== e).map(q));
2921
+ return ep((Array.isArray(n.albums) ? n.albums : []).map(Q).filter((e)=>null !== e).map(eo));
2178
2922
  })();
2179
- })(), loadGenres = (e)=>ex(function*() {
2180
- return eT(function*() {
2181
- let t = es(e), i = eL((e.genreId || "").trim(), v);
2182
- if (!i) return eR(m.map((e)=>{
2183
- var t;
2184
- return {
2185
- id: e.id,
2186
- type: "url",
2187
- mediaType: "genre",
2188
- link: (t = e.id, `${v}${t}`),
2189
- title: Widget.i18n(e.title),
2190
- subtitle: Widget.i18n(e.subtitle),
2191
- genreTitle: Widget.i18n(e.title)
2192
- };
2193
- }), e);
2194
- let r = eN(e), l = e.section || "albums", n = yield eS("/api/playlist/list", {
2923
+ })(), loadGenres = (e)=>tl(function*() {
2924
+ return e0(function*() {
2925
+ let t = ew(e), i = e5((e.genreId || "").trim(), U);
2926
+ if (!i) {
2927
+ let i = e.source || "all";
2928
+ if ("styles" === i) {
2929
+ let i = yield eB("/api/tag/list/get", {}, t);
2930
+ return e8((Array.isArray(i.data) ? i.data : []).map(el).filter((e)=>null !== e).map((e)=>e1({
2931
+ id: `style:${e.tagId}`,
2932
+ type: "url",
2933
+ mediaType: "genre",
2934
+ link: T(`style:${e.tagId}`),
2935
+ title: e.tagName,
2936
+ subtitle: e.enName || Widget.i18n("曲风馆"),
2937
+ genreTitle: e.tagName
2938
+ }, e.imageUrl ? {
2939
+ posterPath: e.imageUrl,
2940
+ coverUrl: e.imageUrl
2941
+ } : {})), e);
2942
+ }
2943
+ return "highquality" === i ? e8(k.map((e)=>({
2944
+ id: `hq:${e.id}`,
2945
+ type: "url",
2946
+ mediaType: "genre",
2947
+ link: T(`hq:${e.id}`),
2948
+ title: Widget.i18n(e.title),
2949
+ subtitle: `${Widget.i18n("精品歌单")} · ${Widget.i18n(e.subtitle)}`,
2950
+ genreTitle: Widget.i18n(e.title)
2951
+ })), e) : e8(k.map((e)=>({
2952
+ id: e.id,
2953
+ type: "url",
2954
+ mediaType: "genre",
2955
+ link: T(e.id),
2956
+ title: Widget.i18n(e.title),
2957
+ subtitle: Widget.i18n(e.subtitle),
2958
+ genreTitle: Widget.i18n(e.title)
2959
+ })), e);
2960
+ }
2961
+ let l = e6(e), r = e.section || "albums";
2962
+ if (i.startsWith("style:") && $(i.slice(6))) {
2963
+ var a, n, o, s;
2964
+ let e = i.slice(6);
2965
+ if ("songs" === r) {
2966
+ let i = yield eB("/api/style-tag/home/song", {
2967
+ tagId: e,
2968
+ cursor: l,
2969
+ size: 30,
2970
+ sort: 0
2971
+ }, t), r = (Array.isArray(null == (a = i.data) ? void 0 : a.songs) ? i.data.songs : []).map(ee).filter((e)=>null !== e), n = ep(r.map(en));
2972
+ return e4(r, n), n;
2973
+ }
2974
+ if ("artists" === r) {
2975
+ let i = yield eB("/api/style-tag/home/artist", {
2976
+ tagId: e,
2977
+ cursor: l,
2978
+ size: 30,
2979
+ sort: 0
2980
+ }, t);
2981
+ return ep((Array.isArray(null == (n = i.data) ? void 0 : n.artists) ? i.data.artists : []).map(X).filter((e)=>null !== e && !!e.id).map((e)=>ec(e)));
2982
+ }
2983
+ let [u, d] = yield Promise.allSettled([
2984
+ eB("/api/style-tag/home/album", {
2985
+ tagId: e,
2986
+ cursor: l,
2987
+ size: 15,
2988
+ sort: 0
2989
+ }, t),
2990
+ eB("/api/style-tag/home/playlist", {
2991
+ tagId: e,
2992
+ cursor: l,
2993
+ size: 15,
2994
+ sort: 0
2995
+ }, t)
2996
+ ]), c = [];
2997
+ if ("fulfilled" === u.status) for (let e of (Array.isArray(null == (o = u.value.data) ? void 0 : o.albums) ? u.value.data.albums : []).map(Q).filter((e)=>null !== e))c.push(eo(e));
2998
+ if ("fulfilled" === d.status) for (let e of (Array.isArray(null == (s = d.value.data) ? void 0 : s.playlist) ? d.value.data.playlist : []).map(Y).filter((e)=>null !== e))c.push(es(e));
2999
+ if (!c.length && "rejected" === u.status) throw u.reason;
3000
+ return ep(c);
3001
+ }
3002
+ if (i.startsWith("hq:")) {
3003
+ let l = i.slice(3) || "全部", a = yield eB("/api/playlist/highquality/list", {
3004
+ cat: l,
3005
+ limit: 60,
3006
+ lasttime: 0,
3007
+ total: !0
3008
+ }, t), n = (Array.isArray(a.playlists) ? a.playlists : []).map(Y).filter((e)=>null !== e);
3009
+ if ("songs" === r || "artists" === r) {
3010
+ let i = n[0];
3011
+ if (!i) return [];
3012
+ let { tracks: l } = yield e9(i.id, t, 60);
3013
+ if ("artists" === r) return e8(ep(l.flatMap((e)=>e.artists).filter((e)=>e.id).map((e)=>ec(e))), e);
3014
+ let a = ep(l.map(en));
3015
+ return e4(l, a), e8(a, e);
3016
+ }
3017
+ return e8(ep(n.map(es)), e);
3018
+ }
3019
+ let u = yield eq("/api/playlist/list", {
2195
3020
  cat: i,
2196
3021
  order: "hot",
2197
3022
  limit: 30,
2198
- offset: r,
3023
+ offset: l,
2199
3024
  total: !0
2200
- }, t), a = (Array.isArray(n.playlists) ? n.playlists : []).map(x).filter((e)=>null !== e);
2201
- if ("songs" === l) {
2202
- let e = a[0];
3025
+ }, t), d = (Array.isArray(u.playlists) ? u.playlists : []).map(Y).filter((e)=>null !== e);
3026
+ if ("songs" === r || "artists" === r) {
3027
+ let e = d[0];
2203
3028
  if (!e) return [];
2204
- let { tracks: i } = yield eE(e.id, t, 60), r = G(i.map(H));
2205
- return ec(r), r;
3029
+ let { tracks: i } = yield e9(e.id, t, 60);
3030
+ if ("artists" === r) return ep(i.flatMap((e)=>e.artists).filter((e)=>e.id).map((e)=>ec(e)));
3031
+ let l = ep(i.map(en));
3032
+ return e4(i, l), l;
2206
3033
  }
2207
- return G(a.map(B));
3034
+ return ep(d.map(es));
2208
3035
  })();
2209
- })(), loadRadios = (e)=>ex(function*() {
2210
- return eT(function*() {
2211
- let t = es(e), i = eL((e.radioId || "").trim(), b);
3036
+ })(), loadRadios = (e)=>tl(function*() {
3037
+ return e0(function*() {
3038
+ let t = ew(e), i = e5((e.radioId || "").trim(), w);
2212
3039
  if (!i) {
2213
3040
  let i = [
2214
3041
  {
2215
3042
  id: "fm:DEFAULT",
2216
3043
  type: "url",
2217
3044
  mediaType: "radio",
2218
- link: k("fm:DEFAULT"),
3045
+ link: j("fm:DEFAULT"),
2219
3046
  title: Widget.i18n("私人漫游 · 默认"),
2220
3047
  subtitle: Widget.i18n("根据你的听歌口味持续推荐(需配置 Cookie)")
2221
3048
  },
@@ -2223,7 +3050,7 @@ WidgetMetadata = {
2223
3050
  id: "fm:FAMILIAR",
2224
3051
  type: "url",
2225
3052
  mediaType: "radio",
2226
- link: k("fm:FAMILIAR"),
3053
+ link: j("fm:FAMILIAR"),
2227
3054
  title: Widget.i18n("私人漫游 · 熟悉"),
2228
3055
  subtitle: Widget.i18n("重温你熟悉和喜欢的旋律(需配置 Cookie)")
2229
3056
  },
@@ -2231,34 +3058,66 @@ WidgetMetadata = {
2231
3058
  id: "fm:EXPLORE",
2232
3059
  type: "url",
2233
3060
  mediaType: "radio",
2234
- link: k("fm:EXPLORE"),
3061
+ link: j("fm:EXPLORE"),
2235
3062
  title: Widget.i18n("私人漫游 · 探索"),
2236
3063
  subtitle: Widget.i18n("发现新鲜小众好音乐(需配置 Cookie)")
2237
3064
  },
3065
+ {
3066
+ id: "fm:SCENE_EXERCISE",
3067
+ type: "url",
3068
+ mediaType: "radio",
3069
+ link: j("fm:SCENE_EXERCISE"),
3070
+ title: Widget.i18n("场景漫游 · 运动"),
3071
+ subtitle: Widget.i18n("高燃节奏伴你运动(需配置 Cookie)")
3072
+ },
3073
+ {
3074
+ id: "fm:SCENE_FOCUS",
3075
+ type: "url",
3076
+ mediaType: "radio",
3077
+ link: j("fm:SCENE_FOCUS"),
3078
+ title: Widget.i18n("场景漫游 · 专注"),
3079
+ subtitle: Widget.i18n("沉浸工作与学习氛围(需配置 Cookie)")
3080
+ },
3081
+ {
3082
+ id: "fm:SCENE_NIGHT",
3083
+ type: "url",
3084
+ mediaType: "radio",
3085
+ link: j("fm:SCENE_NIGHT"),
3086
+ title: Widget.i18n("场景漫游 · 深夜情绪"),
3087
+ subtitle: Widget.i18n("治愈深夜情绪的私藏歌单(需配置 Cookie)")
3088
+ },
2238
3089
  {
2239
3090
  id: "heart",
2240
3091
  type: "url",
2241
3092
  mediaType: "radio",
2242
- link: k("heart"),
3093
+ link: j("heart"),
2243
3094
  title: Widget.i18n("心动模式"),
2244
3095
  subtitle: Widget.i18n("以我喜欢的音乐为种子智能推荐(需配置 Cookie)")
2245
3096
  },
3097
+ {
3098
+ id: "sport",
3099
+ type: "url",
3100
+ mediaType: "radio",
3101
+ link: j("sport"),
3102
+ title: Widget.i18n("跑步漫游"),
3103
+ subtitle: Widget.i18n("按 160 BPM 步频推荐的动感节奏")
3104
+ },
2246
3105
  {
2247
3106
  id: "radar",
2248
3107
  type: "url",
2249
3108
  mediaType: "radio",
2250
- link: k("radar"),
3109
+ link: j("radar"),
2251
3110
  title: Widget.i18n("私人雷达"),
2252
3111
  subtitle: Widget.i18n("每日更新的个性化精选电台")
2253
3112
  }
2254
3113
  ];
2255
3114
  try {
2256
- let e = yield eS("/api/toplist/detail", {}, t);
2257
- for (let t of (Array.isArray(e.list) ? e.list : []).map(x).filter((e)=>null !== e).slice(0, 8))i.push(e$({
3115
+ let e = yield eq("/api/toplist/detail", {}, t);
3116
+ for (let t of (Array.isArray(e.list) ? e.list : []).map(Y).filter((e)=>null !== e).slice(0, 8))i.push(e1({
2258
3117
  id: `pl:${t.id}`,
2259
3118
  type: "url",
2260
3119
  mediaType: "radio",
2261
- link: k(`pl:${t.id}`),
3120
+ link: j(`pl:${t.id}`),
2262
3121
  title: t.name
2263
3122
  }, t.owner ? {
2264
3123
  subtitle: t.owner
@@ -2267,40 +3126,65 @@ WidgetMetadata = {
2267
3126
  coverUrl: t.imageUrl
2268
3127
  } : {}));
2269
3128
  } catch (e) {}
2270
- return eR(i, e);
3129
+ return e8(i, e);
2271
3130
  }
2272
- let r = [];
2273
- if ("fm:DEFAULT" === i || "fm:FAMILIAR" === i || "fm:EXPLORE" === i) {
2274
- let e = i.slice(3), [l, n] = yield Promise.allSettled([
2275
- eW(e, t),
2276
- eW(e, t)
3131
+ let l = [], r = tt[i];
3132
+ if (r) {
3133
+ let [e, i] = yield Promise.allSettled([
3134
+ te(r.mode, r.subMode, t),
3135
+ te(r.mode, r.subMode, t)
2277
3136
  ]);
2278
- if ("fulfilled" === l.status && r.push(...l.value), "fulfilled" === n.status && r.push(...n.value), !r.length && "rejected" === l.status) throw l.reason;
2279
- } else if ("heart" === i) r = yield eT(function*() {
2280
- let { uid: e } = yield eU(t), i = yield eS("/api/user/playlist", {
3137
+ if ("fulfilled" === e.status && l.push(...e.value), "fulfilled" === i.status && l.push(...i.value), !l.length && "rejected" === e.status) throw e.reason;
3138
+ } else if ("heart" === i) l = yield e0(function*() {
3139
+ let { uid: e } = yield ez(t), i = yield eq("/api/user/playlist", {
2281
3140
  uid: e,
2282
3141
  limit: 30,
2283
3142
  offset: 0
2284
- }, t), r = (Array.isArray(i.playlist) ? i.playlist : []).find((e)=>5 === Number(e.specialType)), l = (null == r ? void 0 : r.id) ? String(r.id) : "";
2285
- if (!l) throw Error(Widget.i18n("未找到「我喜欢的音乐」歌单,无法开启心动模式"));
2286
- let { tracks: n } = yield eE(l, t, 50), a = n[Math.floor(Math.random() * n.length)];
2287
- if (!a) throw Error(Widget.i18n("「我喜欢的音乐」为空,请先收藏几首歌曲再使用心动模式"));
2288
- let o = yield eO("/api/playmode/intelligence/list", {
2289
- songId: a.id,
2290
- startMusicId: a.id,
2291
- playlistId: l,
3143
+ }, t), l = (Array.isArray(i.playlist) ? i.playlist : []).find((e)=>5 === Number(e.specialType)), r = (null == l ? void 0 : l.id) ? String(l.id) : "";
3144
+ if (!r) throw Error(Widget.i18n("未找到「我喜欢的音乐」歌单,无法开启心动模式"));
3145
+ let { tracks: a } = yield e9(r, t, 50), n = a[Math.floor(Math.random() * a.length)];
3146
+ if (!n) throw Error(Widget.i18n("「我喜欢的音乐」为空,请先收藏几首歌曲再使用心动模式"));
3147
+ let o = yield eB("/api/playmode/intelligence/list", {
3148
+ songId: n.id,
3149
+ startMusicId: n.id,
3150
+ playlistId: r,
2292
3151
  type: "fromPlayOne",
2293
3152
  count: 30
2294
- }, t), s = (Array.isArray(o.data) ? o.data : []).map((e)=>V(null == e ? void 0 : e.songInfo)).filter((e)=>null !== e);
2295
- return s.length ? s : n;
3153
+ }, t), s = (Array.isArray(o.data) ? o.data : []).map((e)=>ee(null == e ? void 0 : e.songInfo)).filter((e)=>null !== e);
3154
+ return s.length ? s : a;
2296
3155
  })();
2297
- else "radar" === i ? r = (yield eE("3136952023", t, 60)).tracks : i.startsWith("pl:") && P(i.slice(3)) ? r = (yield eE(i.slice(3), t, 60)).tracks : P(i) && (r = (yield eE(i, t, 60)).tracks);
2298
- let l = e.section || "songs";
2299
- if ("artists" === l) return eR(G(r.flatMap((e)=>e.artists).filter((e)=>e.id).map((e)=>z(e))), e);
2300
- if ("albums" === l) return eR(G(r.flatMap((e)=>{
3156
+ else if ("sport" === i) l = yield e0(function*() {
3157
+ var e;
3158
+ let i = yield Promise.allSettled([
3159
+ eB("/api/radio/sport/get", {
3160
+ bpm: 160
3161
+ }, t),
3162
+ eB("/api/radio/sport/get", {
3163
+ bpm: 160
3164
+ }, t),
3165
+ eB("/api/radio/sport/get", {
3166
+ bpm: 160
3167
+ }, t)
3168
+ ]), l = [];
3169
+ for (let e of i)if ("fulfilled" === e.status && Array.isArray(e.value.data)) for (let t of e.value.data){
3170
+ let e = ee(t);
3171
+ e && l.push(e);
3172
+ }
3173
+ if (!l.length && (null == (e = i[0]) ? void 0 : e.status) === "rejected") throw i[0].reason;
3174
+ return l;
3175
+ })();
3176
+ else if ("radar" === i) l = (yield e9("3136952023", t, 60)).tracks;
3177
+ else if (i.startsWith("pl:") && $(i.slice(3))) l = (yield e9(i.slice(3), t, 60)).tracks;
3178
+ else if (i.startsWith("dj:") && $(i.slice(3))) {
3179
+ let { programs: l } = yield e7(i.slice(3), t, 60), r = ep(l.map(ed));
3180
+ return eT(r), e8(r, e);
3181
+ } else $(i) && (l = (yield e9(i, t, 60)).tracks);
3182
+ let a = e.section || "songs";
3183
+ if ("artists" === a) return e8(ep(l.flatMap((e)=>e.artists).filter((e)=>e.id).map((e)=>ec(e))), e);
3184
+ if ("albums" === a) return e8(ep(l.flatMap((e)=>{
2301
3185
  var t;
2302
3186
  return (null == (t = e.album) ? void 0 : t.id) ? [
2303
- q({
3187
+ eo({
2304
3188
  id: e.album.id,
2305
3189
  name: e.album.name,
2306
3190
  imageUrl: e.album.imageUrl || e.imageUrl,
@@ -2308,87 +3192,183 @@ WidgetMetadata = {
2308
3192
  })
2309
3193
  ] : [];
2310
3194
  })), e);
2311
- let n = G(r.map(H));
2312
- return ec(n), eR(n, e);
3195
+ let n = ep(l.map(en));
3196
+ return e4(l, n), e8(n, e);
3197
+ })();
3198
+ })(), loadPodcasts = (e)=>tl(function*() {
3199
+ return e0(function*() {
3200
+ let t = ew(e), i = e.category || "recommend", l = e6(e);
3201
+ if ("programs" === i) {
3202
+ let e = yield eB("/api/program/toplist/v1", {
3203
+ limit: 30,
3204
+ offset: l
3205
+ }, t), i = ep((Array.isArray(e.toplist) ? e.toplist : []).map((e)=>ei(null == e ? void 0 : e.program)).filter((e)=>null !== e).map(ed));
3206
+ return eT(i), i;
3207
+ }
3208
+ if ("hot" === i) {
3209
+ let e = yield eB("/api/djradio/hot/v1", {
3210
+ limit: 30,
3211
+ offset: l
3212
+ }, t);
3213
+ return ep((Array.isArray(e.djRadios) ? e.djRadios : []).map(et).filter((e)=>null !== e).map(eu));
3214
+ }
3215
+ if ("toplist_hot" === i || "toplist_new" === i) {
3216
+ let e = yield eB("/api/djradio/toplist", {
3217
+ type: +("toplist_hot" === i),
3218
+ limit: 30,
3219
+ offset: l
3220
+ }, t);
3221
+ return ep((Array.isArray(e.toplist) ? e.toplist : []).map(et).filter((e)=>null !== e).map(eu));
3222
+ }
3223
+ let r = yield eB("/api/djradio/recommend/v1", {}, t);
3224
+ return e8(ep((Array.isArray(r.djRadios) ? r.djRadios : []).map(et).filter((e)=>null !== e).map(eu)), e);
2313
3225
  })();
2314
- })(), loadArtists = (e)=>ex(function*() {
2315
- return eT(function*() {
2316
- let t = es(e), i = (e.peopleId || "").trim(), r = eN(e);
3226
+ })(), loadArtists = (e)=>tl(function*() {
3227
+ return e0(function*() {
3228
+ let t = ew(e), i = (e.peopleId || "").trim(), l = e6(e);
2317
3229
  if (!i) {
2318
- let e = yield eS("/api/artist/top", {
3230
+ var r, a;
3231
+ let i = "ZH" === (r = e.area) || "EA" === r || "JP" === r || "KR" === r || "OTHER" === r ? r : "ALL", n = "MALE" === (a = e.artistType) || "FEMALE" === a || "BAND" === a ? a : "ALL";
3232
+ if ("ALL" !== i || "ALL" !== n) {
3233
+ let e = yield eB("/api/v1/artist/list", {
3234
+ area: g[i],
3235
+ type: v[n],
3236
+ limit: 30,
3237
+ offset: l,
3238
+ total: !0
3239
+ }, t);
3240
+ return ep((Array.isArray(e.artists) ? e.artists : []).map(X).filter((e)=>null !== e && !!e.id).map((e)=>ec(e)));
3241
+ }
3242
+ let o = yield eq("/api/artist/top", {
2319
3243
  limit: 30,
2320
- offset: r
3244
+ offset: l
2321
3245
  }, t);
2322
- return G((Array.isArray(e.artists) ? e.artists : []).map(W).filter((e)=>null !== e && !!e.id).map((e)=>z(e)));
3246
+ return ep((Array.isArray(o.artists) ? o.artists : []).map(X).filter((e)=>null !== e && !!e.id).map((e)=>ec(e)));
2323
3247
  }
2324
- if (!P(i)) return [];
3248
+ if (!$(i)) return [];
2325
3249
  if ("profile" === e.section) {
2326
- let e = yield eS(`/api/v1/artist/${i}`, {}, t), r = W(e.artist);
3250
+ let [e, l] = yield Promise.allSettled([
3251
+ eq(`/api/v1/artist/${i}`, {}, t),
3252
+ eB("/api/artist/introduction", {
3253
+ id: i
3254
+ }, t, {
3255
+ timeout: 6
3256
+ })
3257
+ ]);
3258
+ if ("rejected" === e.status) throw e.reason;
3259
+ let r = X(e.value.artist);
2327
3260
  if (!r) return [];
2328
- let l = e.artist || {}, n = "string" == typeof l.briefDesc ? l.briefDesc.trim() : "", a = Number(l.musicSize) || 0, o = Number(l.albumSize) || 0;
3261
+ let a = e.value.artist || {}, n = ("fulfilled" === l.status && "string" == typeof l.value.briefDesc ? l.value.briefDesc.trim() : "") || ("string" == typeof a.briefDesc ? a.briefDesc.trim() : ""), o = Number(a.musicSize) || 0, s = Number(a.albumSize) || 0, u = [
3262
+ o > 0 ? `${o} ${Widget.i18n("首歌曲")}` : "",
3263
+ s > 0 ? `${s} ${Widget.i18n("张专辑")}` : ""
3264
+ ].filter(Boolean).join(" · "), d = [];
3265
+ if ("fulfilled" === l.status && Array.isArray(l.value.introduction)) for (let e of l.value.introduction.slice(0, 3)){
3266
+ let t = "string" == typeof (null == e ? void 0 : e.ti) ? e.ti.trim() : "", i = "string" == typeof (null == e ? void 0 : e.txt) ? e.txt.trim() : "";
3267
+ t && i && d.push(`${t}\n${i}`);
3268
+ }
2329
3269
  return [
2330
- z(r, [
2331
- [
2332
- a > 0 ? `${a} ${Widget.i18n("首歌曲")}` : "",
2333
- o > 0 ? `${o} ${Widget.i18n("张专辑")}` : ""
2334
- ].filter(Boolean).join(" · "),
2335
- n
2336
- ].filter(Boolean).join("\n") || void 0)
3270
+ ec(r, [
3271
+ u,
3272
+ n,
3273
+ ...d
3274
+ ].filter(Boolean).join("\n\n") || void 0)
2337
3275
  ];
2338
3276
  }
2339
3277
  if ("albums" === e.section) {
2340
- let e = yield eS(`/api/artist/albums/${i}`, {
3278
+ let e = yield eq(`/api/artist/albums/${i}`, {
2341
3279
  limit: 30,
2342
- offset: r
3280
+ offset: l
2343
3281
  }, t);
2344
- return G((Array.isArray(e.hotAlbums) ? e.hotAlbums : []).map(_).filter((e)=>null !== e).map(q));
3282
+ return ep((Array.isArray(e.hotAlbums) ? e.hotAlbums : []).map(Q).filter((e)=>null !== e).map(eo));
2345
3283
  }
2346
3284
  if ("artists" === e.section) try {
2347
- let r = yield eS("/api/discovery/simiArtist", {
3285
+ let l = yield eq("/api/discovery/simiArtist", {
2348
3286
  artistid: i
2349
3287
  }, t, {
2350
3288
  method: "POST"
2351
- }), l = (Array.isArray(r.artists) ? r.artists : []).map(W).filter((e)=>null !== e && !!e.id && e.id !== i);
2352
- return eR(G(l.map((e)=>z(e))), e);
3289
+ }), r = (Array.isArray(l.artists) ? l.artists : []).map(X).filter((e)=>null !== e && !!e.id && e.id !== i);
3290
+ return e8(ep(r.map((e)=>ec(e))), e);
2353
3291
  } catch (e) {
2354
3292
  return [];
2355
3293
  }
2356
- if (0 === r) {
2357
- let e = yield eS(`/api/v1/artist/${i}`, {}, t), r = (Array.isArray(e.hotSongs) ? e.hotSongs : []).map(V).filter((e)=>null !== e);
2358
- if (r.length) {
2359
- let e = G(r.map(H));
2360
- return ec(e), e.slice(0, 30);
3294
+ if (0 === l) {
3295
+ let e = yield eq(`/api/v1/artist/${i}`, {}, t), l = (Array.isArray(e.hotSongs) ? e.hotSongs : []).map(ee).filter((e)=>null !== e);
3296
+ if (l.length) {
3297
+ let e = ep(l.map(en));
3298
+ return e4(l, e), e.slice(0, 30);
2361
3299
  }
2362
3300
  }
2363
- let l = yield eS("/api/v1/artist/songs", {
3301
+ let n = yield eq("/api/v1/artist/songs", {
2364
3302
  id: i,
2365
3303
  order: "hot",
2366
3304
  limit: 30,
2367
- offset: r
3305
+ offset: l
2368
3306
  }, t, {
2369
3307
  method: "POST"
2370
- }), n = G((Array.isArray(l.songs) ? l.songs : []).map(V).filter((e)=>null !== e).map(H));
2371
- return ec(n), n;
3308
+ }), o = (Array.isArray(n.songs) ? n.songs : []).map(ee).filter((e)=>null !== e), s = ep(o.map(en));
3309
+ return e4(o, s), s;
2372
3310
  })();
2373
- })(), loadLibrary = (e)=>ex(function*() {
2374
- return eT(function*() {
2375
- var t;
2376
- let i = es(e), r = e.tab || "liked", l = eN(e), { uid: n } = yield eU(i);
2377
- if ("cloud" === r) {
2378
- let e = yield eO("/api/v1/cloud/get", {
3311
+ })(), loadLibrary = (e)=>tl(function*() {
3312
+ return e0(function*() {
3313
+ var t, i, l, r;
3314
+ let a = ew(e), n = e.tab || "liked", o = e6(e), { uid: s } = yield ez(a);
3315
+ if ("recent_songs" === n) {
3316
+ let t = yield eB("/api/play-record/song/list", {
3317
+ limit: 100
3318
+ }, a), l = (Array.isArray(null == (i = t.data) ? void 0 : i.list) ? t.data.list : []).map((e)=>ee(null == e ? void 0 : e.data)).filter((e)=>null !== e), r = ep(l.map(en));
3319
+ return e4(l, r), e8(r, e);
3320
+ }
3321
+ if ("recent_albums" === n) {
3322
+ let t = yield eB("/api/play-record/album/list", {
3323
+ limit: 100
3324
+ }, a);
3325
+ return e8(ep((Array.isArray(null == (l = t.data) ? void 0 : l.list) ? t.data.list : []).map((e)=>Q(null == e ? void 0 : e.data)).filter((e)=>null !== e).map(eo)), e);
3326
+ }
3327
+ if ("recent_playlists" === n) {
3328
+ let t = yield eB("/api/play-record/playlist/list", {
3329
+ limit: 100
3330
+ }, a);
3331
+ return e8(ep((Array.isArray(null == (r = t.data) ? void 0 : r.list) ? t.data.list : []).map((e)=>Y(null == e ? void 0 : e.data)).filter((e)=>null !== e).map(es)), e);
3332
+ }
3333
+ if ("sub_albums" === n) {
3334
+ let e = yield eB("/api/album/sublist", {
2379
3335
  limit: 30,
2380
- offset: l
2381
- }, i), t = [];
3336
+ offset: o,
3337
+ total: !0
3338
+ }, a);
3339
+ return ep((Array.isArray(e.data) ? e.data : []).map(Q).filter((e)=>null !== e).map(eo));
3340
+ }
3341
+ if ("sub_artists" === n) {
3342
+ let e = yield eB("/api/artist/sublist", {
3343
+ limit: 30,
3344
+ offset: o,
3345
+ total: !0
3346
+ }, a);
3347
+ return ep((Array.isArray(e.data) ? e.data : []).map(X).filter((e)=>null !== e && !!e.id).map((e)=>ec(e)));
3348
+ }
3349
+ if ("sub_podcasts" === n) {
3350
+ let e = yield eB("/api/djradio/get/subed", {
3351
+ limit: 30,
3352
+ offset: o,
3353
+ total: !0
3354
+ }, a);
3355
+ return ep((Array.isArray(e.djRadios) ? e.djRadios : []).map(et).filter((e)=>null !== e).map(eu));
3356
+ }
3357
+ if ("cloud" === n) {
3358
+ let e = yield eB("/api/v1/cloud/get", {
3359
+ limit: 30,
3360
+ offset: o
3361
+ }, a), t = [];
2382
3362
  for (let i of Array.isArray(e.data) ? e.data : []){
2383
- let e = V(i.simpleSong);
3363
+ let e = ee(i.simpleSong);
2384
3364
  if (e) {
2385
3365
  t.push(e);
2386
3366
  continue;
2387
3367
  }
2388
- let r = i.songId ? String(i.songId) : "";
2389
- P(r) && t.push({
2390
- id: r,
2391
- name: i.songName || r,
3368
+ let l = i.songId ? String(i.songId) : "";
3369
+ $(l) && t.push({
3370
+ id: l,
3371
+ name: i.songName || l,
2392
3372
  artists: i.artist ? [
2393
3373
  {
2394
3374
  id: "",
@@ -2402,234 +3382,367 @@ WidgetMetadata = {
2402
3382
  duration: 0
2403
3383
  });
2404
3384
  }
2405
- let r = G(t.map(H));
2406
- return ec(r), r;
3385
+ let i = ep(t.map(en));
3386
+ return e4(t, i), i;
2407
3387
  }
2408
- if ("recent_week" === r || "recent_all" === r) {
2409
- let t = +("recent_week" === r), l = yield eS("/api/v1/play/record", {
2410
- uid: n,
3388
+ if ("recent_week" === n || "recent_all" === n) {
3389
+ let t = +("recent_week" === n), i = yield eq("/api/v1/play/record", {
3390
+ uid: s,
2411
3391
  type: t
2412
- }, i, {
3392
+ }, a, {
2413
3393
  method: "POST"
2414
- }), a = 1 === t ? l.weekData : l.allData, o = G((Array.isArray(a) ? a : []).map((e)=>V(null == e ? void 0 : e.song)).filter((e)=>null !== e).map(H));
2415
- return ec(o), eR(o, e);
3394
+ }), l = 1 === t ? i.weekData : i.allData, r = (Array.isArray(l) ? l : []).map((e)=>ee(null == e ? void 0 : e.song)).filter((e)=>null !== e), o = ep(r.map(en));
3395
+ return e4(r, o), e8(o, e);
2416
3396
  }
2417
- let a = yield eS("/api/user/playlist", {
2418
- uid: n,
3397
+ let u = yield eq("/api/user/playlist", {
3398
+ uid: s,
2419
3399
  limit: 30,
2420
- offset: "playlists" === r ? l : 0
2421
- }, i), o = Array.isArray(a.playlist) ? a.playlist : [];
2422
- if ("playlists" === r) return G(o.map(x).filter((e)=>null !== e).map(B));
2423
- let s = null != (t = o.find((e)=>5 === Number(e.specialType))) ? t : o[0], u = (null == s ? void 0 : s.id) ? String(s.id) : "";
2424
- if (!u) return [];
2425
- let { tracks: d } = yield eE(u, i, 300), c = G(d.map(H));
2426
- return ec(c), eR(c, e);
3400
+ offset: "playlists" === n ? o : 0
3401
+ }, a), d = Array.isArray(u.playlist) ? u.playlist : [];
3402
+ if ("playlists" === n) return ep(d.map(Y).filter((e)=>null !== e).map(es));
3403
+ let c = null != (t = d.find((e)=>5 === Number(e.specialType))) ? t : d[0], p = (null == c ? void 0 : c.id) ? String(c.id) : "";
3404
+ if (!p) return [];
3405
+ let { tracks: f } = yield e9(p, a, 300), m = ep(f.map(en));
3406
+ return e4(f, m), e8(m, e);
3407
+ })();
3408
+ })(), loadSubtitle = (e)=>tl(function*() {
3409
+ return e0(function*() {
3410
+ var t, i;
3411
+ let l = ew(e), r = function(e) {
3412
+ if (e.link) {
3413
+ let t = E(e.link);
3414
+ if ((null == t ? void 0 : t.kind) === "song") return t.id;
3415
+ }
3416
+ let t = (e.id || "").trim();
3417
+ if ($(t)) return t;
3418
+ let i = E(t);
3419
+ return (null == i ? void 0 : i.kind) === "song" ? i.id : "";
3420
+ }(e);
3421
+ if (!r) {
3422
+ let i = [
3423
+ e.title || e.episodeName || "",
3424
+ e.seriesName || ""
3425
+ ].map((e)=>e.trim()).filter(Boolean).join(" ").trim();
3426
+ if (!i) return [];
3427
+ let a = yield eq("/api/cloudsearch/pc", {
3428
+ s: i,
3429
+ type: b.songs,
3430
+ limit: 1,
3431
+ offset: 0,
3432
+ total: !0
3433
+ }, l, {
3434
+ method: "POST"
3435
+ }), n = Array.isArray(null == (t = a.result) ? void 0 : t.songs) ? ee(a.result.songs[0]) : null;
3436
+ if (!n) return [];
3437
+ r = n.id;
3438
+ }
3439
+ let a = yield (i = r, e$(function*() {
3440
+ return eB("/api/song/lyric", {
3441
+ id: i,
3442
+ tv: -1,
3443
+ lv: -1,
3444
+ rv: -1,
3445
+ kv: -1,
3446
+ _nmclfl: 1
3447
+ }, l, {
3448
+ timeout: 10
3449
+ });
3450
+ })());
3451
+ return function(e, t) {
3452
+ var i, l, r;
3453
+ let a = eZ(null == (i = t.lrc) ? void 0 : i.lyric), n = eZ(null == (l = t.tlyric) ? void 0 : l.lyric), o = eZ(null == (r = t.romalrc) ? void 0 : r.lyric), s = [];
3454
+ if (a && n) {
3455
+ let t = function(e, t) {
3456
+ let i = eX(e), l = eX(t);
3457
+ if (!i.lines.length || !l.lines.length) return "";
3458
+ let r = [
3459
+ ...i.metadata
3460
+ ], a = 0;
3461
+ for (let e of i.lines){
3462
+ for(r.push(`${e.timestamp}${e.text}`); a < l.lines.length && l.lines[a].timeMs < e.timeMs - 250;)a++;
3463
+ let t = "", i = 251, n = a;
3464
+ for(; n < l.lines.length && l.lines[n].timeMs <= e.timeMs + 250;){
3465
+ let r = Math.abs(l.lines[n].timeMs - e.timeMs);
3466
+ r < i && (i = r, t = l.lines[n].text), n++;
3467
+ }
3468
+ t && t !== e.text && r.push(`${e.timestamp}${t}`);
3469
+ }
3470
+ return r.join("\n");
3471
+ }(a, n);
3472
+ t && s.push({
3473
+ id: `ncm:lyric:${e}:bilingual`,
3474
+ title: Widget.i18n("双语歌词(原文 + 译文)"),
3475
+ lang: "zh-CN",
3476
+ url: eQ(t)
3477
+ });
3478
+ }
3479
+ return a && s.push({
3480
+ id: `ncm:lyric:${e}:orig`,
3481
+ title: Widget.i18n("原文歌词"),
3482
+ lang: n ? "und" : "zh-CN",
3483
+ url: eQ(a)
3484
+ }), n && s.push({
3485
+ id: `ncm:lyric:${e}:tlyric`,
3486
+ title: Widget.i18n("中文翻译歌词"),
3487
+ lang: "zh-CN",
3488
+ url: eQ(n)
3489
+ }), o && s.push({
3490
+ id: `ncm:lyric:${e}:romalrc`,
3491
+ title: Widget.i18n("罗马音歌词"),
3492
+ lang: "und",
3493
+ url: eQ(o)
3494
+ }), s;
3495
+ }(r, a);
2427
3496
  })();
2428
- })(), search = (e)=>ex(function*() {
2429
- return eT(function*() {
2430
- var t, i, r, l, n, a, o, s, u;
2431
- let d = es(e), c = (e.keyword || "").trim();
2432
- if (!c) return [];
2433
- let p = e.kind || "all", m = eD(e.page), y = eN(e);
2434
- if ("all" === p) {
2435
- if (1 === m && 0 === y) {
2436
- let [e, t, i, o] = yield Promise.allSettled([
2437
- eS("/api/cloudsearch/pc", {
2438
- s: c,
2439
- type: f.songs,
3497
+ })(), search = (e)=>tl(function*() {
3498
+ return e0(function*() {
3499
+ var t, i, l, r, a, n, o, s, u, d, c;
3500
+ let p = ew(e), f = (e.keyword || "").trim();
3501
+ if (!f) return e0(function*() {
3502
+ try {
3503
+ let t = yield eB("/api/hotsearchlist/get", {}, p, {
3504
+ timeout: 10
3505
+ }), i = Array.isArray(t.data) ? t.data : [], l = [];
3506
+ return i.forEach((e, t)=>{
3507
+ let i = "string" == typeof (null == e ? void 0 : e.searchWord) ? e.searchWord.trim() : "";
3508
+ if (!i) return;
3509
+ let r = t + 1, a = "string" == typeof e.content ? e.content.trim() : "", n = Number(e.score) || 0, o = a || (n > 0 ? `${Widget.i18n("热搜")} · ${n}` : Widget.i18n("网易云热搜榜")), s = R("string" == typeof e.iconUrl ? e.iconUrl : void 0);
3510
+ l.push(e1({
3511
+ id: `hot:${r}`,
3512
+ type: "url",
3513
+ mediaType: "playlist",
3514
+ link: M(i),
3515
+ title: `${r}. ${i}`,
3516
+ subtitle: o
3517
+ }, s ? {
3518
+ posterPath: s,
3519
+ coverUrl: s
3520
+ } : {}));
3521
+ }), e8(l, e);
3522
+ } catch (e) {
3523
+ return [];
3524
+ }
3525
+ })();
3526
+ let m = e.kind || "all", y = e3(e.page), g = e6(e);
3527
+ if ("voices" === m) {
3528
+ let e = yield eB("/api/search/voice/get", {
3529
+ keyword: f,
3530
+ scene: "normal",
3531
+ limit: 30,
3532
+ offset: g
3533
+ }, p), t = ep((Array.isArray(null == (i = e.data) ? void 0 : i.resources) ? e.data.resources : []).map((e)=>ei(null == e ? void 0 : e.baseInfo)).filter((e)=>null !== e).map(ed));
3534
+ return eT(t), t;
3535
+ }
3536
+ if ("all" === m) {
3537
+ if (1 === y && 0 === g) {
3538
+ let [e, t, i, l] = yield Promise.allSettled([
3539
+ eq("/api/cloudsearch/pc", {
3540
+ s: f,
3541
+ type: b.songs,
2440
3542
  limit: 20,
2441
3543
  offset: 0,
2442
3544
  total: !0
2443
- }, d, {
3545
+ }, p, {
2444
3546
  method: "POST"
2445
3547
  }),
2446
- eS("/api/cloudsearch/pc", {
2447
- s: c,
2448
- type: f.artists,
3548
+ eq("/api/cloudsearch/pc", {
3549
+ s: f,
3550
+ type: b.artists,
2449
3551
  limit: 4,
2450
3552
  offset: 0,
2451
3553
  total: !0
2452
- }, d, {
3554
+ }, p, {
2453
3555
  method: "POST"
2454
3556
  }),
2455
- eS("/api/cloudsearch/pc", {
2456
- s: c,
2457
- type: f.albums,
3557
+ eq("/api/cloudsearch/pc", {
3558
+ s: f,
3559
+ type: b.albums,
2458
3560
  limit: 4,
2459
3561
  offset: 0,
2460
3562
  total: !0
2461
- }, d, {
3563
+ }, p, {
2462
3564
  method: "POST"
2463
3565
  }),
2464
- eS("/api/cloudsearch/pc", {
2465
- s: c,
2466
- type: f.playlists,
3566
+ eq("/api/cloudsearch/pc", {
3567
+ s: f,
3568
+ type: b.playlists,
2467
3569
  limit: 4,
2468
3570
  offset: 0,
2469
3571
  total: !0
2470
- }, d, {
3572
+ }, p, {
2471
3573
  method: "POST"
2472
3574
  })
2473
- ]), s = [];
2474
- if ("fulfilled" === t.status) for (let e of (Array.isArray(null == (r = t.value.result) ? void 0 : r.artists) ? t.value.result.artists : []).map(W).filter((e)=>null !== e && !!e.id))s.push(z(e));
2475
- if ("fulfilled" === i.status) for (let e of (Array.isArray(null == (l = i.value.result) ? void 0 : l.albums) ? i.value.result.albums : []).map(_).filter((e)=>null !== e))s.push(q(e));
2476
- if ("fulfilled" === e.status) for (let t of (Array.isArray(null == (n = e.value.result) ? void 0 : n.songs) ? e.value.result.songs : []).map(V).filter((e)=>null !== e))s.push(H(t));
2477
- if ("fulfilled" === o.status) for (let e of (Array.isArray(null == (a = o.value.result) ? void 0 : a.playlists) ? o.value.result.playlists : []).map(x).filter((e)=>null !== e))s.push(B(e));
3575
+ ]), s = [], u = [];
3576
+ if ("fulfilled" === t.status) for (let e of (Array.isArray(null == (r = t.value.result) ? void 0 : r.artists) ? t.value.result.artists : []).map(X).filter((e)=>null !== e && !!e.id))s.push(ec(e));
3577
+ if ("fulfilled" === i.status) for (let e of (Array.isArray(null == (a = i.value.result) ? void 0 : a.albums) ? i.value.result.albums : []).map(Q).filter((e)=>null !== e))s.push(eo(e));
3578
+ if ("fulfilled" === e.status) for (let t of (Array.isArray(null == (n = e.value.result) ? void 0 : n.songs) ? e.value.result.songs : []).map(ee).filter((e)=>null !== e))u.push(t), s.push(en(t));
3579
+ if ("fulfilled" === l.status) for (let e of (Array.isArray(null == (o = l.value.result) ? void 0 : o.playlists) ? l.value.result.playlists : []).map(Y).filter((e)=>null !== e))s.push(es(e));
2478
3580
  if (!s.length && "rejected" === e.status) throw e.reason;
2479
- let u = G(s);
2480
- return ec(u), u;
3581
+ let d = ep(s);
3582
+ return e4(u, d), d;
2481
3583
  }
2482
- let e = Math.max(20, (m - 1) * 20), t = yield eS("/api/cloudsearch/pc", {
2483
- s: c,
2484
- type: f.songs,
3584
+ let e = Math.max(20, (y - 1) * 20), t = yield eq("/api/cloudsearch/pc", {
3585
+ s: f,
3586
+ type: b.songs,
2485
3587
  limit: 20,
2486
3588
  offset: e,
2487
3589
  total: !0
2488
- }, d, {
3590
+ }, p, {
2489
3591
  method: "POST"
2490
- }), o = G((Array.isArray(null == (i = t.result) ? void 0 : i.songs) ? t.result.songs : []).map(V).filter((e)=>null !== e).map(H));
2491
- return ec(o), o;
3592
+ }), i = (Array.isArray(null == (l = t.result) ? void 0 : l.songs) ? t.result.songs : []).map(ee).filter((e)=>null !== e), s = ep(i.map(en));
3593
+ return e4(i, s), s;
2492
3594
  }
2493
- let g = f[p], h = yield eS("/api/cloudsearch/pc", {
2494
- s: c,
2495
- type: g,
3595
+ let v = b[m], h = yield eq("/api/cloudsearch/pc", {
3596
+ s: f,
3597
+ type: v,
2496
3598
  limit: 30,
2497
- offset: y,
3599
+ offset: g,
2498
3600
  total: !0
2499
- }, d, {
3601
+ }, p, {
2500
3602
  method: "POST"
2501
3603
  });
2502
- if ("songs" === p) {
2503
- let e = G((Array.isArray(null == (o = h.result) ? void 0 : o.songs) ? h.result.songs : []).map(V).filter((e)=>null !== e).map(H));
2504
- return ec(e), e;
3604
+ if ("songs" === m || "lyrics" === m) {
3605
+ let e = Array.isArray(null == (s = h.result) ? void 0 : s.songs) ? h.result.songs : [], t = [], i = [];
3606
+ for (let l of e){
3607
+ let e = ee(l);
3608
+ if (!e) continue;
3609
+ t.push(e);
3610
+ let r = en(e);
3611
+ if ("lyrics" === m && Array.isArray(null == l ? void 0 : l.lyrics) && l.lyrics.length) {
3612
+ let e = l.lyrics.slice(0, 3).map((e)=>"string" == typeof e ? e.replace(/<[^>]+>/g, "").trim() : "").filter(Boolean).join("\n");
3613
+ e && (r.description = e);
3614
+ }
3615
+ i.push(r);
3616
+ }
3617
+ let l = ep(i);
3618
+ return e4(t, l), l;
2505
3619
  }
2506
- return "albums" === p ? G((Array.isArray(null == (s = h.result) ? void 0 : s.albums) ? h.result.albums : []).map(_).filter((e)=>null !== e).map(q)) : "artists" === p ? G((Array.isArray(null == (u = h.result) ? void 0 : u.artists) ? h.result.artists : []).map(W).filter((e)=>null !== e && !!e.id).map((e)=>z(e))) : G((Array.isArray(null == (t = h.result) ? void 0 : t.playlists) ? h.result.playlists : []).map(x).filter((e)=>null !== e).map(B));
3620
+ return "albums" === m ? ep((Array.isArray(null == (u = h.result) ? void 0 : u.albums) ? h.result.albums : []).map(Q).filter((e)=>null !== e).map(eo)) : "artists" === m ? ep((Array.isArray(null == (d = h.result) ? void 0 : d.artists) ? h.result.artists : []).map(X).filter((e)=>null !== e && !!e.id).map((e)=>ec(e))) : "dj" === m ? ep((Array.isArray(null == (c = h.result) ? void 0 : c.djRadios) ? h.result.djRadios : []).map(et).filter((e)=>null !== e).map(eu)) : ep((Array.isArray(null == (t = h.result) ? void 0 : t.playlists) ? h.result.playlists : []).map(Y).filter((e)=>null !== e).map(es));
2507
3621
  })();
2508
- })(), loadDetail = (e)=>ex(function*() {
2509
- return eT(function*() {
2510
- var t, i, r;
2511
- let l = function(e) {
2512
- let t = (e || "").trim();
2513
- if (!t) return null;
2514
- if (t.startsWith(y)) {
2515
- let e = t.slice(y.length).trim();
2516
- return P(e) ? {
2517
- kind: "song",
2518
- id: e
2519
- } : null;
2520
- }
2521
- if (t.startsWith(g)) {
2522
- let e = t.slice(g.length).trim();
2523
- return P(e) ? {
2524
- kind: "album",
2525
- id: e
2526
- } : null;
2527
- }
2528
- if (t.startsWith(h)) {
2529
- let e = t.slice(h.length).trim();
2530
- return P(e) ? {
2531
- kind: "playlist",
2532
- id: e
2533
- } : null;
2534
- }
2535
- let i = /music\.163\.com\/(?:#\/)?(song|album|playlist)\?[^#]*\bid=(\d{1,20})\b/i.exec(t);
2536
- return (null == i ? void 0 : i[1]) && i[2] ? {
2537
- kind: i[1].toLowerCase(),
2538
- id: i[2]
2539
- } : null;
2540
- }(e);
2541
- if (!l) throw Error(`${Widget.i18n("无法识别的详情链接")}: ${e}`);
2542
- let n = eo();
2543
- return "song" === l.kind ? (t = l.id, eT(function*() {
2544
- var e, i, r, l;
2545
- let o, u = (o = ei(ee)) && "object" == typeof o && null != (i = o[t]) ? i : null, [d, p] = yield Promise.all([
2546
- ef(function*() {
2547
- var e, i, r;
2548
- let l = function(e, t, i, r = Date.now()) {
2549
- let l = ei(Q);
2550
- if (!l || "object" != typeof l) return null;
2551
- let n = l[`${e}:${t}:${i ? "1" : "0"}`];
2552
- return !n || "string" != typeof n.url || "number" != typeof n.cachedAt || r - n.cachedAt > 900000 ? null : n;
2553
- }(t, n.quality, n.allowTrial);
2554
- if (l) return {
2555
- url: l.url,
2556
- format: l.format,
2557
- level: l.level,
2558
- bitrate: l.bitrate,
2559
- isTrial: l.isTrial,
3622
+ })(), loadDetail = (e)=>tl(function*() {
3623
+ return e0(function*() {
3624
+ var t, i, l, a, o;
3625
+ let u = E(e);
3626
+ if (!u) throw Error(`${Widget.i18n("无法识别的详情链接")}: ${e}`);
3627
+ let d = eU();
3628
+ return "song" === u.kind ? (t = u.id, e0(function*() {
3629
+ var e, i, l, a, o;
3630
+ let u, c = (u = eA(eb)) && "object" == typeof u && null != (l = u[t]) ? l : null, [p, y, g, v] = yield Promise.all([
3631
+ e$(function*() {
3632
+ var e, i, l;
3633
+ let r = function(e, t, i, l = Date.now()) {
3634
+ let r = eA(eh);
3635
+ if (!r || "object" != typeof r) return null;
3636
+ let a = r[`${e}:${t}:${i ? "1" : "0"}`];
3637
+ return !a || "string" != typeof a.url || "number" != typeof a.cachedAt || l - a.cachedAt > 900000 ? null : a;
3638
+ }(t, d.quality, d.allowTrial);
3639
+ if (r) return {
3640
+ url: r.url,
3641
+ format: r.format,
3642
+ level: r.level,
3643
+ bitrate: r.bitrate,
3644
+ isTrial: r.isTrial,
2560
3645
  headers: {
2561
3646
  "User-Agent": s,
2562
- Referer: `${a}/`
3647
+ Referer: `${n}/`
2563
3648
  }
2564
3649
  };
2565
- let o = "lossless" === n.quality || "hires" === n.quality ? "flac" : "mp3", u = [];
3650
+ let a = "vivid" === d.quality ? "mp3" : m(d.quality) ? "flac" : "mp3", o = "vivid" === d.quality ? "android" : "pc", u = {
3651
+ ids: `[${t}]`,
3652
+ level: d.quality,
3653
+ encodeType: a
3654
+ };
3655
+ "sky" === d.quality && (u.immerseType = "c51");
3656
+ let c = [];
2566
3657
  try {
2567
- let e = yield ew(()=>eO("/api/song/enhance/player/url/v1", {
2568
- ids: `[${t}]`,
2569
- level: n.quality,
2570
- encodeType: o
2571
- }, n), 3);
2572
- u = Array.isArray(e.data) ? e.data : [];
3658
+ let e = yield eF(()=>eB("/api/song/enhance/player/url/v1", u, d, {
3659
+ clientProfile: o
3660
+ }), 3);
3661
+ c = Array.isArray(e.data) ? e.data : [];
2573
3662
  } catch (i) {
2574
- if (!eC(i)) throw i;
2575
- let e = yield ew(()=>eO("/api/song/enhance/player/url", {
3663
+ if (!eH(i)) throw i;
3664
+ let e = yield eF(()=>eB("/api/song/enhance/player/url", {
2576
3665
  ids: `[${t}]`,
2577
- br: c[n.quality] || 320000
2578
- }, n), 2);
2579
- u = Array.isArray(e.data) ? e.data : [];
3666
+ br: f[d.quality] || 320000
3667
+ }, d), 2);
3668
+ c = Array.isArray(e.data) ? e.data : [];
2580
3669
  }
2581
- let d = null != (r = (i = u).find((e)=>String(e.id) === t)) ? r : i[0], p = A(null != (e = null == d ? void 0 : d.url) ? e : void 0), f = (null == d ? void 0 : d.freeTrialInfo) !== null && (null == d ? void 0 : d.freeTrialInfo) !== void 0;
2582
- if (!d || !p || void 0 !== d.code && 200 !== d.code) throw Error(Widget.i18n("当前歌曲暂无可用播放源,可能需要登录网易云黑胶 VIP 账号或受地区版权限制"));
2583
- if (f && !n.allowTrial) throw Error(Widget.i18n("当前歌曲仅返回 30 秒 VIP 试听片段;请配置黑胶 VIP Cookie,或在模块设置中开启「允许播放 30 秒试听」"));
2584
- let m = (d.type || ("lossless" === d.level || "hires" === d.level ? "flac" : "mp3")).toLowerCase(), y = ev.has(m) ? m : "mp3", g = "string" == typeof d.level && d.level ? d.level : n.quality, h = "number" == typeof d.br && Number.isFinite(d.br) ? d.br : 0;
2585
- return !function(e, t, i, r, l = Date.now()) {
2586
- var n, a;
2587
- let o = ei(Q), s = o && "object" == typeof o ? J({}, o) : {}, u = `${e}:${t}:${i ? "1" : "0"}`;
2588
- delete s[u], s[u] = (n = J({}, r), a = a = {
2589
- cachedAt: l
2590
- }, Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(a)) : (function(e) {
3670
+ let p = null != (l = (i = c).find((e)=>String(e.id) === t)) ? l : i[0], y = N(null != (e = null == p ? void 0 : p.url) ? e : void 0), g = (null == p ? void 0 : p.freeTrialInfo) !== null && (null == p ? void 0 : p.freeTrialInfo) !== void 0;
3671
+ if (!p || !y || void 0 !== p.code && 200 !== p.code) throw Error(Widget.i18n("当前歌曲暂无可用播放源,可能需要登录网易云黑胶 VIP 账号或受地区版权限制"));
3672
+ if (g && !d.allowTrial) throw Error(Widget.i18n("当前歌曲仅返回 30 秒 VIP 试听片段;请配置黑胶 VIP Cookie,或在模块设置中开启「允许播放 30 秒试听」"));
3673
+ let v = (p.type || (p.level && m(p.level) ? "flac" : "mp3")).toLowerCase(), h = eL.has(v) ? v : "mp3", b = "string" == typeof p.level && p.level ? p.level : d.quality, k = "number" == typeof p.br && Number.isFinite(p.br) ? p.br : 0;
3674
+ return !function(e, t, i, l, r = Date.now()) {
3675
+ var a, n;
3676
+ let o = eA(eh), s = o && "object" == typeof o ? ef({}, o) : {}, u = `${e}:${t}:${i ? "1" : "0"}`;
3677
+ delete s[u], s[u] = (a = ef({}, l), n = n = {
3678
+ cachedAt: r
3679
+ }, Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(n)) : (function(e) {
2591
3680
  var t = Object.keys(e);
2592
3681
  if (Object.getOwnPropertySymbols) {
2593
3682
  var i = Object.getOwnPropertySymbols(e);
2594
3683
  t.push.apply(t, i);
2595
3684
  }
2596
3685
  return t;
2597
- })(Object(a)).forEach(function(e) {
2598
- Object.defineProperty(n, e, Object.getOwnPropertyDescriptor(a, e));
2599
- }), n);
3686
+ })(Object(n)).forEach(function(e) {
3687
+ Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(n, e));
3688
+ }), a);
2600
3689
  let d = Object.keys(s);
2601
3690
  if (d.length > 50) for (let e of d.slice(0, d.length - 50))delete s[e];
2602
- er(Q, s);
2603
- }(t, n.quality, n.allowTrial, {
2604
- url: p,
2605
- format: y,
2606
- level: g,
2607
- bitrate: h,
2608
- isTrial: f
3691
+ eP(eh, s);
3692
+ }(t, d.quality, d.allowTrial, {
3693
+ url: y,
3694
+ format: h,
3695
+ level: b,
3696
+ bitrate: k,
3697
+ isTrial: g
2609
3698
  }), {
2610
- url: p,
2611
- format: y,
2612
- level: g,
2613
- bitrate: h,
2614
- isTrial: f,
3699
+ url: y,
3700
+ format: h,
3701
+ level: b,
3702
+ bitrate: k,
3703
+ isTrial: g,
2615
3704
  headers: {
2616
3705
  "User-Agent": s,
2617
- Referer: `${a}/`
3706
+ Referer: `${n}/`
2618
3707
  }
2619
3708
  };
2620
3709
  })(),
2621
- u ? Promise.resolve(null) : eI([
3710
+ c ? Promise.resolve(null) : eJ([
2622
3711
  t
2623
- ], n).then((e)=>{
3712
+ ], d).then((e)=>{
2624
3713
  var t;
2625
3714
  return null != (t = e[0]) ? t : null;
2626
- }).catch(()=>null)
3715
+ }).catch(()=>null),
3716
+ e0(function*() {
3717
+ try {
3718
+ let e = yield eB("/api/v1/discovery/simiSong", {
3719
+ songid: t,
3720
+ limit: 10,
3721
+ offset: 0
3722
+ }, d, {
3723
+ timeout: 6
3724
+ }), i = (Array.isArray(e.songs) ? e.songs : []).map(ee).filter((e)=>null !== e && e.id !== t), l = ep(i.map(en));
3725
+ return e4(i, l), l;
3726
+ } catch (e) {
3727
+ return [];
3728
+ }
3729
+ })(),
3730
+ e$(function*() {
3731
+ var e;
3732
+ if (r(d.cookie).hasMusicU) return N(null == (e = (yield eB("/api/songplay/dynamic-cover", {
3733
+ songId: t
3734
+ }, d, {
3735
+ timeout: 6
3736
+ })).data) ? void 0 : e.videoPlayUrl);
3737
+ })().catch(()=>void 0)
2627
3738
  ]);
2628
- if (!u && p) {
2629
- let e = H(p);
2630
- ec([
3739
+ if (!c && y) {
3740
+ let e = en(y);
3741
+ e4([
3742
+ y
3743
+ ], [
2631
3744
  e
2632
- ]), u = {
3745
+ ]), c = {
2633
3746
  id: t,
2634
3747
  title: e.title,
2635
3748
  subtitle: e.subtitle,
@@ -2637,40 +3750,88 @@ WidgetMetadata = {
2637
3750
  coverUrl: e.coverUrl,
2638
3751
  duration: e.duration,
2639
3752
  durationText: e.durationText,
2640
- peoples: e.peoples
3753
+ peoples: e.peoples,
3754
+ mvId: y.mvId,
3755
+ albumId: null == (i = y.album) ? void 0 : i.id
2641
3756
  };
2642
3757
  }
2643
- let f = (null == u ? void 0 : u.duration) || 0, m = f > 0 ? E(f) : null == u ? void 0 : u.durationText, g = (null == u ? void 0 : u.posterPath) || (null == u ? void 0 : u.coverUrl), h = (r = n.playerType, l = d.format, "system" === r || "app" === r ? r : "flac" === l.toLowerCase() ? "app" : void 0), v = [
2644
- (null == u ? void 0 : u.subtitle) || "",
2645
- d.isTrial ? Widget.i18n("试听") : ""
3758
+ let h = (null == c ? void 0 : c.mvId) || (null == y ? void 0 : y.mvId) || 0, b = h > 0 ? yield e$(function*() {
3759
+ var e;
3760
+ if (Number.isFinite(h) && !(h <= 0)) return N(null == (e = (yield eB("/api/song/enhance/play/mv/url", {
3761
+ id: Math.floor(h),
3762
+ r: 1080
3763
+ }, d, {
3764
+ timeout: 6
3765
+ })).data) ? void 0 : e.url);
3766
+ })().catch(()=>void 0) : void 0, k = (null == c ? void 0 : c.duration) || 0, A = k > 0 ? Z(k) : null == c ? void 0 : c.durationText, P = (null == c ? void 0 : c.posterPath) || (null == c ? void 0 : c.coverUrl), S = function(e, t) {
3767
+ if ("system" === e || "app" === e) return e;
3768
+ let i = t.toLowerCase();
3769
+ if ("flac" === i || "alac" === i) return "app";
3770
+ }(d.playerType, p.format), C = [
3771
+ (null == c ? void 0 : c.subtitle) || "",
3772
+ p.isTrial ? Widget.i18n("试听") : ""
2646
3773
  ].filter(Boolean);
2647
- return e$(ej(e$({
3774
+ return d.reportHistory && r(d.cookie).hasMusicU && (a = null == c ? void 0 : c.albumId, o = k || 180, e$(function*() {
3775
+ d.reportHistory && r(d.cookie).hasMusicU && (yield eB("/api/feedback/weblog", {
3776
+ logs: JSON.stringify([
3777
+ {
3778
+ action: "play",
3779
+ json: {
3780
+ download: 0,
3781
+ end: "playend",
3782
+ id: t,
3783
+ sourceId: a || "",
3784
+ time: Math.max(0, Math.round(o)),
3785
+ type: "song",
3786
+ wifi: 0,
3787
+ source: "list",
3788
+ mainsite: 1,
3789
+ content: ""
3790
+ }
3791
+ }
3792
+ ])
3793
+ }, d, {
3794
+ timeout: 6
3795
+ }));
3796
+ })()).catch(()=>void 0), e1(e2(e1({
2648
3797
  id: t,
2649
3798
  type: "url",
2650
3799
  mediaType: "song",
2651
- link: `${y}${t}`,
2652
- title: (null == u ? void 0 : u.title) || t
2653
- }, v.length ? {
2654
- subtitle: v.join(" · ")
2655
- } : {}, g ? {
2656
- posterPath: g,
2657
- coverUrl: g
2658
- } : {}, f > 0 ? e$({
2659
- duration: f
2660
- }, m ? {
2661
- durationText: m
2662
- } : {}) : {}, (null == u || null == (e = u.peoples) ? void 0 : e.length) ? {
2663
- peoples: u.peoples
3800
+ link: O(t),
3801
+ title: (null == c ? void 0 : c.title) || t
3802
+ }, C.length ? {
3803
+ subtitle: C.join(" · ")
3804
+ } : {}, P ? {
3805
+ posterPath: P,
3806
+ coverUrl: P
3807
+ } : {}, k > 0 ? e1({
3808
+ duration: k
3809
+ }, A ? {
3810
+ durationText: A
3811
+ } : {}) : {}, (null == c || null == (e = c.peoples) ? void 0 : e.length) ? {
3812
+ peoples: c.peoples
3813
+ } : {}, v ? {
3814
+ albumMotionArtwork: v
3815
+ } : {}, b ? {
3816
+ trailers: [
3817
+ e2(e1({}, P ? {
3818
+ coverUrl: P
3819
+ } : {}), {
3820
+ videoUrl: b
3821
+ })
3822
+ ]
3823
+ } : {}, g.length ? {
3824
+ relatedItems: g
2664
3825
  } : {}), {
2665
- videoUrl: d.url,
2666
- customHeaders: d.headers
2667
- }), h ? {
2668
- playerType: h
3826
+ videoUrl: p.url,
3827
+ customHeaders: p.headers
3828
+ }), S ? {
3829
+ playerType: S
2669
3830
  } : {});
2670
- })()) : "album" === l.kind ? (i = l.id, eT(function*() {
2671
- let e = yield eS(`/api/v1/album/${i}`, {}, n), t = _(e.album);
3831
+ })()) : "album" === u.kind ? (i = u.id, e0(function*() {
3832
+ let e = yield eq(`/api/v1/album/${i}`, {}, d), t = Q(e.album);
2672
3833
  if (!t) throw Error(Widget.i18n("未找到该专辑"));
2673
- let r = (Array.isArray(e.songs) ? e.songs : []).map(V).filter((e)=>null !== e).map((e)=>ej(e$({}, e), {
3834
+ let l = (Array.isArray(e.songs) ? e.songs : []).map(ee).filter((e)=>null !== e).map((e)=>e2(e1({}, e), {
2674
3835
  artists: e.artists.length ? e.artists : t.artists,
2675
3836
  album: {
2676
3837
  id: t.id,
@@ -2678,37 +3839,112 @@ WidgetMetadata = {
2678
3839
  imageUrl: t.imageUrl
2679
3840
  },
2680
3841
  imageUrl: e.imageUrl || t.imageUrl
2681
- })).map(H);
2682
- ec(r);
2683
- let l = t.artists.map((e)=>e.name).filter(Boolean).join(" / "), a = F(t.artists), o = C(t.imageUrl);
2684
- return ej(e$({
3842
+ })), r = l.map(en);
3843
+ e4(l, r);
3844
+ let a = t.artists.map((e)=>e.name).filter(Boolean).join(" / "), n = ea(t.artists), o = R(t.imageUrl), s = [
3845
+ [
3846
+ t.subType || "",
3847
+ t.company || ""
3848
+ ].filter(Boolean).join(" · "),
3849
+ t.description || ""
3850
+ ].filter(Boolean).join("\n") || void 0;
3851
+ return e2(e1({
2685
3852
  id: t.id,
2686
3853
  type: "url",
2687
3854
  mediaType: "album",
2688
3855
  link: `ncm:album:${t.id}`,
2689
3856
  title: t.name
2690
- }, l ? {
2691
- subtitle: l
3857
+ }, a ? {
3858
+ subtitle: a
2692
3859
  } : {}, o ? {
2693
3860
  posterPath: o,
2694
3861
  coverUrl: o
2695
3862
  } : {}, t.released ? {
2696
3863
  releaseDate: t.released
3864
+ } : {}, s ? {
3865
+ description: s
3866
+ } : {}, n ? {
3867
+ peoples: n
3868
+ } : {}), {
3869
+ tracks: r
3870
+ });
3871
+ })()) : "dj" === u.kind ? (l = u.id, e0(function*() {
3872
+ var e;
3873
+ let { radio: t, programs: i } = yield e7(l, d, 100), r = i.map(ed);
3874
+ eT(r);
3875
+ let a = [
3876
+ t.host || "",
3877
+ t.category || ""
3878
+ ].filter(Boolean).join(" · ") || void 0;
3879
+ return e2(e1({
3880
+ id: `dj:${t.id}`,
3881
+ type: "url",
3882
+ mediaType: "playlist",
3883
+ link: (e = t.id, `${C}${e}`),
3884
+ title: t.name
3885
+ }, a ? {
3886
+ subtitle: a
3887
+ } : {}, t.imageUrl ? {
3888
+ posterPath: t.imageUrl,
3889
+ coverUrl: t.imageUrl
2697
3890
  } : {}, t.description ? {
2698
3891
  description: t.description
2699
- } : {}, a ? {
2700
- peoples: a
2701
3892
  } : {}), {
2702
3893
  tracks: r
2703
3894
  });
2704
- })()) : (r = l.id, eT(function*() {
3895
+ })()) : "hot" === u.kind ? (a = u.keyword, e0(function*() {
3896
+ var e, t, i;
3897
+ let l = yield eq("/api/cloudsearch/pc", {
3898
+ s: a,
3899
+ type: b.songs,
3900
+ limit: 30,
3901
+ offset: 0,
3902
+ total: !0
3903
+ }, d, {
3904
+ method: "POST"
3905
+ }), r = (Array.isArray(null == (e = l.result) ? void 0 : e.songs) ? l.result.songs : []).map(ee).filter((e)=>null !== e), n = ep(r.map(en));
3906
+ e4(r, n);
3907
+ let o = (null == (t = n[0]) ? void 0 : t.posterPath) || (null == (i = n[0]) ? void 0 : i.coverUrl);
3908
+ return e2(e1({
3909
+ id: `hot:${a}`,
3910
+ type: "url",
3911
+ mediaType: "playlist",
3912
+ link: M(a),
3913
+ title: a,
3914
+ subtitle: Widget.i18n("网易云热搜榜")
3915
+ }, o ? {
3916
+ posterPath: o,
3917
+ coverUrl: o
3918
+ } : {}), {
3919
+ tracks: n
3920
+ });
3921
+ })()) : (o = u.id, e0(function*() {
2705
3922
  var e;
2706
- let { playlist: t, tracks: i } = yield eE(r, n, 300), l = i.map(H);
2707
- return ec(l), ej(e$({
3923
+ let [{ playlist: t, tracks: i }, l] = yield Promise.all([
3924
+ e9(o, d, 300),
3925
+ e0(function*() {
3926
+ try {
3927
+ var e;
3928
+ let t = yield eB("/api/playlist/detail/rcmd/get", {
3929
+ scene: "playlist_head",
3930
+ playlistId: o,
3931
+ newStyle: "true"
3932
+ }, d, {
3933
+ timeout: 6
3934
+ }), i = (Array.isArray(null == (e = t.data) ? void 0 : e.recPlaylist) ? t.data.recPlaylist : []).map((e)=>Y(null == e ? void 0 : e.playlist)).filter((e)=>null !== e && e.id !== o);
3935
+ return ep(i.map(es));
3936
+ } catch (e) {
3937
+ return [];
3938
+ }
3939
+ })()
3940
+ ]), r = i.map(en);
3941
+ e4(i, r);
3942
+ let a = er(t.tags);
3943
+ return e2(e1({
2708
3944
  id: t.id,
2709
3945
  type: "url",
2710
3946
  mediaType: "playlist",
2711
- link: (e = t.id, `${h}${e}`),
3947
+ link: (e = t.id, `${S}${e}`),
2712
3948
  title: t.name
2713
3949
  }, t.owner ? {
2714
3950
  subtitle: t.owner
@@ -2717,8 +3953,12 @@ WidgetMetadata = {
2717
3953
  coverUrl: t.imageUrl
2718
3954
  } : {}, t.description ? {
2719
3955
  description: t.description
3956
+ } : {}, a ? {
3957
+ genreItems: a
3958
+ } : {}, l.length ? {
3959
+ relatedItems: l
2720
3960
  } : {}), {
2721
- tracks: l
3961
+ tracks: r
2722
3962
  });
2723
3963
  })());
2724
3964
  })();