#!/bin/bash
OUT=/mnt/md2/Complete/Quiz-Audio
IMG=jauderho/yt-dlp:latest
dl () {
  local name="$1"; local query="$2"
  echo "=== $name ==="
  docker run --rm -v "$OUT":/downloads "$IMG" \
    -x --audio-format mp3 --audio-quality 5 --force-overwrite --no-continue \
    --postprocessor-args "-ss 0 -t 60" \
    -o "/downloads/${name}.%(ext)s" \
    "ytsearch1:${query}" || echo "!! MISLUKT: $name"
}

dl topgun         "Top Gun Anthem Harold Faltermeyer"
dl forrest        "Forrest Gump main theme Alan Silvestri feather"
dl terminator     "Terminator theme Brad Fiedel"
dl gladiator      "Gladiator Now We Are Free Hans Zimmer"
dl lionking       "Lion King Circle of Life"
dl monsters       "Monsters Inc theme Randy Newman"
dl superman       "Superman theme John Williams 1978"
dl amelie         "Amelie theme Yann Tiersen Comptine"
dl diehard        "Die Hard Ode to Joy Beethoven theme Michael Kamen"

echo "=== KLAAR ==="
ls -1 "$OUT"/*.mp3 | wc -l
