#!/bin/sh
mkdir -p "output"
TRACK=1
for file in *.opus; do
  NEW_FILENAME=$(echo $file | sed 's/ - Kirby Super Star OST//')
  TITLE=$(echo $file | sed 's/ - Kirby Super Star OST.opus//')
  ffmpeg -i "$file" -metadata artist="Nintendo" -metadata album="Kirby Super Star OST" -metadata title="$TITLE" -metadata track="$TRACK" -codec copy "output/$file"
  ((TRACK++))
done
