From aa5c68b56c82808f980776047b90d9fd7d332911 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 15 Feb 2023 19:52:51 -0500 Subject: [PATCH] Remove automatic root folder configuration #202 Since /music is not required, do not auto configure it... --- root/scripts/AutoConfig.bash | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/root/scripts/AutoConfig.bash b/root/scripts/AutoConfig.bash index 43c9e89..be17a9f 100644 --- a/root/scripts/AutoConfig.bash +++ b/root/scripts/AutoConfig.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.2" +scriptVersion="1.0.3" if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" @@ -35,13 +35,6 @@ if [ -f /config/extended/logs/autoconfig ]; then exit fi -if curl -s "$lidarrUrl/api/v1/rootFolder" -H "X-Api-Key: ${lidarrApiKey}" | sed '1q' | grep "\[\]" | read; then - log "ERROR :: No root folder found" - log "Configuring root folder..." - getSettingsToLidarr=$(curl -s "$lidarrUrl/api/v1/filesystem?path=%2Fmusic&allowFoldersWithoutTrailingSlashes=false&includeFiles=false" -H "X-Api-Key: ${lidarrApiKey}") - postSettingsToLidarr=$(curl -s "$lidarrUrl/api/v1/rootFolder?" -X POST -H 'Content-Type: application/json' -H "X-Api-Key: ${lidarrApiKey}" --data-raw '{"defaultTags":[],"defaultQualityProfileId":1,"defaultMetadataProfileId":1,"name":"Music","path":"/music"}') -fi - log "Configuring Lidarr Media Management Settings" postSettingsToLidarr=$(curl -s "$lidarrUrl/api/v1/config/mediamanagement" -X PUT -H 'Content-Type: application/json' -H "X-Api-Key: ${lidarrApiKey}" --data-raw '{"autoUnmonitorPreviouslyDownloadedTracks":false,"recycleBin":"","recycleBinCleanupDays":7,"downloadPropersAndRepacks":"preferAndUpgrade","createEmptyArtistFolders":true,"deleteEmptyFolders":true,"fileDate":"none","watchLibraryForChanges":true,"rescanAfterRefresh":"always","allowFingerprinting":"newFiles","setPermissionsLinux":false,"chmodFolder":"777","chownGroup":"","skipFreeSpaceCheckWhenImporting":false,"minimumFreeSpaceWhenImporting":100,"copyUsingHardlinks":true,"importExtraFiles":true,"extraFileExtensions":"jpg,png,lrc","id":1}')