23 lines
670 B
Bash
Executable File
23 lines
670 B
Bash
Executable File
#Script to h265ize and copy to rclone one season at a time
|
|
# Nick Leffler
|
|
|
|
mydir1="${0%/*}"
|
|
source "${mydir1}/info.inc"
|
|
in1="${1%/}" # takes input and strips last slash /
|
|
show=$(basename "${in1}")
|
|
date22=$(date +'%Y%m%d_%H%M%S')
|
|
logdir="${loglocation}/${date22}/"
|
|
tempshow="${temp}/${show}"
|
|
IFS=$'\n' # make newlines the only separator
|
|
|
|
mkdir -p "${logdir}"
|
|
cd "${logdir}" || exit
|
|
mkdir -p "${tempshow}"
|
|
|
|
for f in "${in1}/Season "*/; do
|
|
season=$(basename "${f}")
|
|
# printf " log $logdir \n in2 $in2 \n f $f \n temp $temp \n"
|
|
h265ize -n en -v --stats -d "${tempshow}" "${f}" || exit
|
|
rclone move -v "${tempshow}/${season}/" "${rclonedest}/${show}/${season}/"
|
|
done
|