"use client"; import * as React from "react"; import { AnimatePresence, motion } from "framer-motion"; import { ArrowRight } from "lucide-react"; import { api } from "@/lib/api"; import { useToast } from "@/components/toast"; import { Button } from "@/components/ui/button"; type Result = Awaited>; const PLACEHOLDER = `Radiohead - Creep Juice WRLD – Lucid Dreams 3. Gorillaz - Feel Good Inc Black Hole Sun by Soundgarden https://deezer.com/album/14880711`; export function BulkImport({ onQueued }: { onQueued?: () => void }) { const toast = useToast(); const [text, setText] = React.useState(""); const [busy, setBusy] = React.useState(false); const [out, setOut] = React.useState(null); const run = async () => { const t = text.trim(); if (!t) { toast("Paste some songs first", true); return; } setBusy(true); setOut(null); try { const d = await api.importList(t); setOut(d); if (d.queued.length) { setText(""); toast(`Queued ${d.queued.length} tracks`); onQueued?.(); } } catch (e) { toast(`Import failed: ${(e as Error).message}`, true); } setBusy(false); }; return (

Import a list

One song per line. Deezer album and playlist URLs are expanded into their tracks. The top match is taken automatically — every job shows what it resolved to, so a bad pick is visible rather than silent.