diff --git a/sonarr/YoutubeSeriesDownloader.service b/sonarr/YoutubeSeriesDownloader.service index daef7ff..22bbeb9 100644 --- a/sonarr/YoutubeSeriesDownloader.service +++ b/sonarr/YoutubeSeriesDownloader.service @@ -1,9 +1,9 @@ #!/usr/bin/env bash -scriptVersion="1.1" +scriptVersion="1.2" ytdlpExtraOpts="--user-agent facebookexternalhit/1.1" -#### Settings -videoFormat="bv[width>=1280]+ba" +#### Import Settings +source /config/extended.conf getArrAppInfo () { # Get Arr App information @@ -174,14 +174,20 @@ YoutubeSeriesDownloaderProcess () { done } -echo "Starting Script...." -for (( ; ; )); do - let i++ - getArrAppInfo - verifyApiAccess - YoutubeSeriesDownloaderProcess - echo "Script sleeping for 2 hours..." - sleep 2h -done +if [ $enableYoutubeSeriesDownloader == true ]; then + log "Starting Script...." + for (( ; ; )); do + let i++ + getArrAppInfo + verifyApiAccess + YoutubeSeriesDownloaderProcess + log "Script sleeping for 2 hours..." + sleep 2h + done +else + log "Script is not enabled, enable by setting enableYoutubeSeriesDownloader to \"true\" by modifying the \"/config/extended.conf\" config file..." + log "Sleeping (infinity) + sleep infinity +fi exit