From 785465b521cad1d90338016311bd0eff30539376 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 12 Jul 2023 14:02:33 +0000 Subject: [PATCH] v1.3 - make configurable --- lidarr/Video.service.bash | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/lidarr/Video.service.bash b/lidarr/Video.service.bash index 34d78c2..c1d71bc 100644 --- a/lidarr/Video.service.bash +++ b/lidarr/Video.service.bash @@ -1,15 +1,21 @@ #!/usr/bin/env bash -scriptVersion="1.2" +scriptVersion="1.3" +scriptName="Video" -# Settings -addFeaturedVideoArtists="true" -videoFormat="bv[width>=1920]+ba" +#### Import Settings +source /config/extended.conf log () { - m_time=`date "+%F %T"` - echo $m_time" :: Video :: $scriptVersion :: "$1 + m_time=`date "+%F %T"` + echo $m_time" :: $scriptName :: $scriptVersion :: "$1 } +if [ "$enableVideo" != "true" ]; then + log "Script is not enabled, enable by setting enableVideo to \"true\" by modifying the \"/config/extended.conf\" config file..." + log "Sleeping (infinity)" + sleep infinity +fi + getArrAppInfo () { # Get Arr App information if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then @@ -713,13 +719,13 @@ VideoProcess () { done } -echo "Starting Script...." +log "Starting Script...." for (( ; ; )); do let i++ - getArrAppInfo - verifyApiAccess + getArrAppInfo + verifyApiAccess VideoProcess - echo "Script sleeping for 15 minutes..." + log "Script sleeping for 15 minutes..." sleep 15m done