Show Suno queue progress and fix track numbering
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name ChatGPT to Suno Prompt Copier
|
||||
// @namespace local.suno-helper
|
||||
// @version 0.7.8
|
||||
// @version 0.7.9
|
||||
// @description Copy structured ChatGPT song prompt versions into Suno fields.
|
||||
// @author local
|
||||
// @match https://chatgpt.com/*
|
||||
@@ -28,7 +28,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
const SCRIPT_VERSION = "0.7.8";
|
||||
const SCRIPT_VERSION = "0.7.9";
|
||||
const STORAGE_KEY = "chatgptSunoPromptSlots";
|
||||
const SLOT_COUNT = 2;
|
||||
const isChatGPT = location.hostname.includes("chatgpt.com") || location.hostname.includes("chat.openai.com");
|
||||
@@ -995,6 +995,7 @@
|
||||
async function prepareSunoWavCandidate(track) {
|
||||
if (!track.id) return extractWavUrl(track.wavUrl);
|
||||
const base = `https://studio-api-prod.suno.com/api/gen/${encodeURIComponent(track.id)}`;
|
||||
const billingDownloadUrl = `https://studio-api-prod.suno.com/api/billing/clips/${encodeURIComponent(track.id)}/download/`;
|
||||
const cdnWavUrl = `https://cdn1.suno.ai/${encodeURIComponent(track.id)}.wav`;
|
||||
try {
|
||||
await callSunoJson(`${base}/convert_wav/`, { method: "POST" });
|
||||
@@ -1008,6 +1009,13 @@
|
||||
} catch (error) {
|
||||
console.warn("[ChatGPT to Suno] wav_file probe failed; local retry will continue", error);
|
||||
}
|
||||
try {
|
||||
const data = await callSunoJson(billingDownloadUrl, { method: "GET" });
|
||||
const direct = extractWavUrl(data);
|
||||
if (direct) return direct;
|
||||
} catch (error) {
|
||||
console.warn("[ChatGPT to Suno] billing download probe failed; local retry will continue", error);
|
||||
}
|
||||
return extractWavUrl(track.wavUrl) || cdnWavUrl;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user