Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env sh
- NAME="95rn16"
- export TZ="Asia/Tokyo"
- while true ; do
- # rename nodate_*.ts files into correct dates, preserving last-modified time
- for filename in ./nodate_*.ts; do
- if [ ! -f "$filename" ]; then
- continue
- fi
- datetime="$(date -d "@$(stat -c "%W" "$filename")" +"%Y-%m-%d_%H-%M-%S%z")"
- modified_datetime="$(date -d "@$(stat -c "%Y" "$filename")" +"%Y%m%d%H%M.%S")"
- mv "$filename" "twitcast_$NAME_${datetime}.ts"
- touch -m -t "$modified_datetime" "twitcast_$NAME_${datetime}.ts"
- done
- streamlink -o "nodate_twitcast_$NAME_$(date +%s).ts" --retry-streams 1 --retry-max 600 $EXTRA_ARGS "https://twitcasting.tv/$NAME" best
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement