-
Notifications
You must be signed in to change notification settings - Fork 160
Open
Description
When downloading songs using yt-dlp, artist names are being saved with array formatting characters in the filename (tried different templates but still same result).
- Example:
['Artist'] - Song Name.flac - Example:
['Artist', 'Artist2'] - Song Name.flac
Expected Behavior
Files should be saved with clean artist names, without array formatting:
- Example:
Artist - Song Name.flac - Example:
Artist & Artist2 - Song Name.flac
Code
$collection = $this->youtubeDl->download(
Options::create()
->downloadPath($downloadPath)
->extractAudio(true)
->audioFormat($format)
->audioQuality('0')
->output('%(artists)s - %(title)s.%(ext)s')
// ->output('%(artist//&)s - %(title)s.%(ext)s')
// ->output('%(artist).1s - %(title)s.%(ext)s')
// ->output('%(title)s.%(ext)s')
->url($url)
);
foreach ($collection->getVideos() as $video) {
if ($video->getError() !== null) {
$result['error'] = $video->getError();
} else {
$result = [
'file' => $video->getFile(),
'title' => $video->getTitle(),
'directory' => $path,
];
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels