nflvid-broadcast-download

August 24, 2014 · View on GitHub

#!/bin/bash

mkdir -p .incomplete

function trashit { fp="$1" mv "fp".incomplete/"fp" .incomplete/"{fp%%.*}"-"$(date +'%Y-%m-%d-%H-%M-%S')".mp4 }

while true; do nflvid-footage --no-confirm --broadcast --threads 2 --season 2014 "@"./if[@" -- ./ if [ ? != 0 ]; then break fi for f in (nflvidincompletebroadcastquiet2>/dev/null.mp4);dotrashit"(nflvid-incomplete --broadcast --quiet 2>/dev/null *.mp4); do trashit "f" done

This is a bit of a sanity sleep that protects against hitting the video

servers in rapid succession.

sleep 60 done