#! /usr/bin/bash 

yt-dlp --cookies ../cookies.txt \
  --download-archive archive.txt \
  --no-playlist \
  -f 'bv,ba' \
  -o '%(id)s/%(id)s.f%(format_id)s.%(ext)s' \
  -o 'infojson:%(id)s/%(id)s.%(ext)s' \
  -o 'thumbnail:%(id)s/%(id)s.%(ext)s' \
  -o 'subtitle:%(id)s/%(id)s.%(ext)s' \
  --write-info-json \
  --write-thumbnail \
  --write-subs \
  --keep-video \
  "$1"
