Fix Suno browser downloads and metadata tags

This commit is contained in:
DESKTOP-KSVGT20\shkim
2026-05-02 01:15:32 +09:00
parent 0cdb412ef5
commit c3b5500a04
2 changed files with 11 additions and 7 deletions
+7 -3
View File
@@ -1,7 +1,7 @@
// ==UserScript==
// @name ChatGPT to Suno Prompt Copier
// @namespace local.suno-helper
// @version 0.8.5
// @version 0.8.6
// @description Copy structured ChatGPT song prompt versions into Suno fields.
// @author local
// @match https://chatgpt.com/*
@@ -10,7 +10,9 @@
// @match https://*.suno.com/*
// @updateURL https://git.mokaya.org/shkim/suno-helper/raw/branch/master/chatgpt-suno-tampermonkey.user.js
// @downloadURL https://git.mokaya.org/shkim/suno-helper/raw/branch/master/chatgpt-suno-tampermonkey.user.js
// @connect cdn*.suno.ai
// @connect *.suno.ai
// @connect cdn1.suno.ai
// @connect cdn2.suno.ai
// @connect *.suno.com
// @connect studio-api-prod.suno.com
// @connect 127.0.0.1
@@ -28,7 +30,7 @@
(function () {
"use strict";
const SCRIPT_VERSION = "0.8.5";
const SCRIPT_VERSION = "0.8.6";
const STORAGE_KEY = "chatgptSunoPromptSlots";
const SLOT_COUNT = 2;
const isChatGPT = location.hostname.includes("chatgpt.com") || location.hostname.includes("chat.openai.com");
@@ -904,6 +906,7 @@
headers: options.headers || {},
data: options.body,
anonymous: false,
withCredentials: true,
timeout: 45000,
onload: (response) => {
resolve({
@@ -927,6 +930,7 @@
url,
headers: options.headers || {},
anonymous: false,
withCredentials: true,
timeout: 120000,
responseType: "arraybuffer",
onload: (response) => {
+4 -4
View File
@@ -268,14 +268,14 @@ function Invoke-DownloadWithRetry {
function Add-MetadataArg {
param(
[System.Collections.Generic.List[string]]$Args,
[System.Collections.Generic.List[string]]$ArgList,
[string]$Key,
[string]$Value
)
if ($Value) {
$Args.Add("-metadata")
$Args.Add("$Key=$Value")
$ArgList.Add("-metadata")
$ArgList.Add("$Key=$Value")
}
}
@@ -456,7 +456,7 @@ foreach ($track in $tracks) {
if ($imageUrl) {
$coverDownloaded = Invoke-Download $imageUrl $rawCoverFile
if ($coverDownloaded) {
& $ffmpeg -hide_banner -y -i $rawCoverFile -frames:v 1 $trackCoverFile
& $ffmpeg -hide_banner -y -i $rawCoverFile -frames:v 1 -update 1 $trackCoverFile
$coverOk = ($LASTEXITCODE -eq 0) -and (Test-Path -LiteralPath $trackCoverFile)
if (-not $coverOk) {
Copy-Item -LiteralPath $rawCoverFile -Destination $trackCoverFile -Force