diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..79b78ea --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build.sh +build.cmd \ No newline at end of file diff --git a/root/etc/services.d/extended/run b/root/etc/services.d/extended/run index 1a6048f..31bfd7c 100644 --- a/root/etc/services.d/extended/run +++ b/root/etc/services.d/extended/run @@ -11,7 +11,7 @@ echo "Project: https://github.com/RandomNinjaAtk/docker-lidarr-extended" echo "Support: https://github.com/RandomNinjaAtk/docker-lidarr-extended/discussions" echo "-----------------------------------------------------------------------------" -if [ "$autoStart" = "true" ]; then +if [ "$autoStart" = "true" ] && [ "$enableAudioScript" = "true" ]; then echo "Automatic Start Enabled, starting in 2 min..." sleep 2m bash /config/extended/scripts/start_audio.sh diff --git a/root/etc/services.d/extended_video/run b/root/etc/services.d/extended_video/run index be2b6e6..3277a65 100644 --- a/root/etc/services.d/extended_video/run +++ b/root/etc/services.d/extended_video/run @@ -10,7 +10,7 @@ echo "Donate: https://github.com/sponsors/RandomNinjaAtk" echo "Project: https://github.com/RandomNinjaAtk/docker-lidarr-extended" echo "Support: https://github.com/RandomNinjaAtk/docker-lidarr-extended/discussions" echo "-----------------------------------------------------------------------------" -if [ "$autoStart" = "true" ]; then +if [ "$autoStart" = "true" ] && [ "$enableVideoScript" = "true" ]; then echo "Automatic Start Enabled, starting in 2 min..." sleep 2m bash /config/extended/scripts/start_video.sh diff --git a/root/scripts/audio.sh b/root/scripts/audio.sh index a3e6924..d69762e 100644 --- a/root/scripts/audio.sh +++ b/root/scripts/audio.sh @@ -1,13 +1,15 @@ #!/usr/bin/env bash scriptVersion="1.0.216" -lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" -if [ "$lidarrUrlBase" = "null" ]; then - lidarrUrlBase="" -else - lidarrUrlBase="/$(echo "$lidarrUrlBase" | sed "s/\///g")" +if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then + lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" + if [ "$lidarrUrlBase" = "null" ]; then + lidarrUrlBase="" + else + lidarrUrlBase="/$(echo "$lidarrUrlBase" | sed "s/\///g")" + fi + lidarrApiKey="$(cat /config/config.xml | xq | jq -r .Config.ApiKey)" + lidarrUrl="http://127.0.0.1:8686${lidarrUrlBase}" fi -lidarrApiKey="$(cat /config/config.xml | xq | jq -r .Config.ApiKey)" -lidarrUrl="http://127.0.0.1:8686${lidarrUrlBase}" agent="lidarr-extended ( https://github.com/RandomNinjaAtk/docker-lidarr-extended )" musicbrainzMirror=https://musicbrainz.org diff --git a/root/scripts/video.sh b/root/scripts/video.sh index 109def5..054824b 100644 --- a/root/scripts/video.sh +++ b/root/scripts/video.sh @@ -1,13 +1,17 @@ #!/usr/bin/env bash scriptVersion="1.0.008" -lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" -if [ "$lidarrUrlBase" = "null" ]; then - lidarrUrlBase="" -else - lidarrUrlBase="/$(echo "$lidarrUrlBase" | sed "s/\///g")" + +if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then + lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" + if [ "$lidarrUrlBase" = "null" ]; then + lidarrUrlBase="" + else + lidarrUrlBase="/$(echo "$lidarrUrlBase" | sed "s/\///g")" + fi + lidarrApiKey="$(cat /config/config.xml | xq | jq -r .Config.ApiKey)" + lidarrUrl="http://127.0.0.1:8686${lidarrUrlBase}" fi -lidarrApiKey="$(cat /config/config.xml | xq | jq -r .Config.ApiKey)" -lidarrUrl="http://127.0.0.1:8686${lidarrUrlBase}" + agent="lidarr-extended ( https://github.com/RandomNinjaAtk/docker-lidarr-extended )" musicbrainzMirror=https://musicbrainz.org