Handle redirected Suno WAV responses
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name ChatGPT to Suno Prompt Copier
|
||||
// @namespace local.suno-helper
|
||||
// @version 0.7.4
|
||||
// @version 0.7.5
|
||||
// @description Copy structured ChatGPT song prompt versions into Suno fields.
|
||||
// @author local
|
||||
// @match https://chatgpt.com/*
|
||||
@@ -27,7 +27,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
const SCRIPT_VERSION = "0.7.4";
|
||||
const SCRIPT_VERSION = "0.7.5";
|
||||
const STORAGE_KEY = "chatgptSunoPromptSlots";
|
||||
const SLOT_COUNT = 2;
|
||||
const isChatGPT = location.hostname.includes("chatgpt.com") || location.hostname.includes("chat.openai.com");
|
||||
@@ -827,6 +827,9 @@
|
||||
...(options.headers || {}),
|
||||
},
|
||||
});
|
||||
const finalUrl = response.url || url;
|
||||
const finalWavUrl = extractWavUrl(finalUrl);
|
||||
if (response.ok && finalWavUrl) return finalWavUrl;
|
||||
const text = await response.text();
|
||||
const data = tryParseJson(text) || text;
|
||||
rememberSunoResponse(url, data);
|
||||
|
||||
Reference in New Issue
Block a user