From d68630a6c77235402198c47fdf21ce44e4325eae Mon Sep 17 00:00:00 2001 From: Nick Leffler Date: Tue, 3 Mar 2020 10:07:18 -0500 Subject: [PATCH] doneish --- convert.sh | 17 ++++++++++++++++- h265ize.csv | 1 + info.inc.example | 6 +++++- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 h265ize.csv diff --git a/convert.sh b/convert.sh index 7dcc6c8..cb5d0a9 100755 --- a/convert.sh +++ b/convert.sh @@ -3,5 +3,20 @@ 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 -h265ize -n en -v --stats -d "/data2/temp/TV/h265/" "/rclone/gdrive/nicks.tv/TV Shows II/N/NCIS/Season 01" +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 diff --git a/h265ize.csv b/h265ize.csv new file mode 100644 index 0000000..59d8b28 --- /dev/null +++ b/h265ize.csv @@ -0,0 +1 @@ +Encoded Date,Filename,Original Size,New Size,Percentage,Duration of Encode \ No newline at end of file diff --git a/info.inc.example b/info.inc.example index d8dfdbd..f04f42b 100644 --- a/info.inc.example +++ b/info.inc.example @@ -1 +1,5 @@ -dest="/h265/TV Shows/" +Just copy this to info.inc and make the required changes + +temp="/data2/temp/h265" +rclonedest="name:/location" +loglocation="/var/log/h265ize"