feat(soundboard): extend URL download to support YouTube & Instagram

yt-dlp extracts audio as MP3 from YouTube and Instagram links.
Direct MP3 links continue to work as before. URL input field now shows
a type indicator (YT/IG/MP3) and validates all three formats.

Backend: downloadWithYtDlp() spawns yt-dlp with --extract-audio,
saves to SOUNDS_DIR, normalizes if enabled. New /download-url route
for save-only without auto-play. play-url route extended for all types.

Frontend: isSupportedUrl() validates YouTube/Instagram/MP3, dynamic
icon changes per URL type, disabled state when URL is unsupported.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel 2026-03-06 23:38:09 +01:00
parent 06326de465
commit 200f03c1f8
3 changed files with 243 additions and 28 deletions

View file

@ -592,6 +592,24 @@
pointer-events: none;
}
.url-import-tag {
flex-shrink: 0;
padding: 1px 6px;
border-radius: 8px;
font-size: 10px;
font-weight: 800;
letter-spacing: .5px;
text-transform: uppercase;
}
.url-import-tag.valid {
background: rgba(46, 204, 113, .18);
color: #2ecc71;
}
.url-import-tag.invalid {
background: rgba(231, 76, 60, .18);
color: #e74c3c;
}
/* ── Toolbar Buttons ── */
.tb-btn {
display: flex;