Skip to content

best way to save what you love

fix download audio button in picker

wukko789acbc99b7f
diff --git a/src/front/cobalt.js b/src/front/cobalt.js
index 37662dfd..58905b3a 100644
--- a/src/front/cobalt.js
+++ b/src/front/cobalt.js
@@ -395,17 +395,9 @@ async function download(url) {
break;
case "picker":
if (j.audio && j.picker) {
- changeDownloadButton(2, '?..')
- fetch(`${j.audio}&p=1`).then(async (res) => {
- let jp = await res.json();
- if (jp.status === "continue") {
- changeDownloadButton(2, '>>>');
- popup('picker', 1, { audio: j.audio, arr: j.picker, type: j.pickerType });
- setTimeout(() => { changeButton(1) }, 2500);
- } else {
- changeButton(0, jp.text);
- }
- }).catch((error) => internetError());
+ changeDownloadButton(2, '>>>');
+ popup('picker', 1, { audio: j.audio, arr: j.picker, type: j.pickerType });
+ setTimeout(() => { changeButton(1) }, 2500);
} else if (j.picker) {
changeDownloadButton(2, '>>>');
popup('picker', 1, { arr: j.picker, type: j.pickerType });
diff --git a/src/modules/sub/utils.js b/src/modules/sub/utils.js
index 52b54bc3..e0e55f6c 100644
--- a/src/modules/sub/utils.js
+++ b/src/modules/sub/utils.js
@@ -27,7 +27,7 @@ export function apiJSON(type, obj) {
switch (obj.service) {
case "douyin":
case "tiktok":
- audio = createStream(obj)
+ audio = obj.u
pickerType = "images"
break;
}