My setup:
Windows Server 2016 Standard
10x3TB raid setup
Sabnzbd
Plex
Radarr
Sonarr
Git and Python installed
Setup is working great just want to make some more improvements for better automation.
This is a REQ for a script to do a combination of a few things that I have seen posted here in this forum :
My gaol is to combine this post "Unzip ISO file"
Code: Select all
#!/bin/sh
cd "$1"
mkdir unpack
cd unpack
# pwd
7z x ../*.iso
7z x ../*.ISO
7z x ../*/*.iso
7z x ../*/*.ISO
Code: Select all
#!/bin/bash
BDMV_FOLD=`find "$1" -name "BDMV" -print0`
if [[ $BDMV_FOLD == *BDMV* ]]; then
# cd to the ./BDMV/STREAM sub folder
cd "$BDMV_FOLD/STREAM/"
# Find the biggest .M2TS file, usually the movie
BIGST_M2TS=`find . -type f | xargs ls -1S | head -n 1 | rev | cut -c 6- | rev`
# MkvMerge the file
mkvmerge -o "$BIGST_M2TS".mkv --compression -1:none "$BIGST_M2TS".m2ts
# Change MKV permission to -rw-r--r-- and move file out of STREAM folder
chmod 644 "$BIGST_M2TS".mkv
mv "$BIGST_M2TS".mkv "$1"
echo "MKV created! ("$1")"
else
echo "BDMV2Mkv: no processing"
fi
If anyone is willing or able to assist in this writeup. I would be most apprciated.
Weezzelboy.