Fix Suno browser downloads and metadata tags
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user