Update video.bash

This commit is contained in:
RandomNinjaAtk 2023-07-07 10:08:26 -04:00 committed by GitHub
parent 006e5b48fd
commit d90652c342
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
scriptVersion="1.0.0" scriptVersion="1.0.1"
######## Settings ######## Settings
videoLanguages="eng" videoLanguages="eng"
@ -11,25 +11,25 @@ enableSmaTagging="true"
InstallRequirements () { InstallRequirements () {
if [ ! -f "/config/scripts/video.txt" ]; then if [ ! -f "/config/scripts/video.txt" ]; then
echo "Installing Required Packages..." echo "Installing Required Packages..."
apk add -U --update --no-cache curl jq python3-dev py3-pip &>/dev/null apk add -U --update --no-cache curl jq python3-dev py3-pip git &>/dev/null
pip install --upgrade --no-cache-dir -U yq &>/dev/null pip install --upgrade --no-cache-dir -U yq &>/dev/null
echo "Done" echo "Done"
fi fi
if [ ! -f /usr/local/sma/manual.py ]; then if [ ! -f /config/scripts/sma/manual.py ]; then
echo "************ setup SMA ************" echo "************ setup SMA ************"
echo "************ setup directory ************" echo "************ setup directory ************"
mkdir -p /usr/local/sma mkdir -p /config/scripts/sma
echo "************ download repo ************" echo "************ download repo ************"
git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git /usr/local/sma git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git /usr/local/sma
mkdir -p /usr/local/sma/config && \ mkdir -p /config/scripts/sma/config && \
echo "************ create logging file ************" echo "************ create logging file ************"
mkdir -p /usr/local/sma/config && \ mkdir -p /config/scripts/sma/config && \
touch /usr/local/sma/config/sma.log && \ touch /config/scripts/sma/config/sma.log && \
chgrp users /usr/local/sma/config/sma.log && \ chgrp users /config/scripts/sma/config/sma.log && \
chmod g+w /usr/local/sma/config/sma.log && \ chmod g+w /config/scripts/sma/config/sma.log && \
echo "************ install pip dependencies ************" && \ echo "************ install pip dependencies ************" && \
python3 -m pip install --upgrade pip && \ python3 -m pip install --upgrade pip && \
pip3 install -r /usr/local/sma/setup/requirements.txt pip3 install -r /config/scripts/sma/setup/requirements.txt
fi fi
} }