v1.0.0024 - New feat: configure standard profile automatically

Also, skip auto configure process after the first time it has been run to allow for user modifications
pull/6/head
RandomNinjaAtk 3 years ago committed by GitHub
parent e724eba7f2
commit 1abd86c66b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -36,7 +36,7 @@ Configuration () {
log "" log ""
sleep 2 sleep 2
log "############# $dockerTitle" log "############# $dockerTitle"
log "############# SCRIPT VERSION 1.0.0023" log "############# SCRIPT VERSION 1.0.0024"
log "############# DOCKER VERSION $dockerVersion" log "############# DOCKER VERSION $dockerVersion"
if [ -z $topLimit ]; then if [ -z $topLimit ]; then
@ -452,6 +452,13 @@ ConfigureLidarrWithOptimalSettings () {
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"}') 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 fi
log ":: Configuring Lidarr Standard Metadata Profile"
postSettingsToLidarr=$(curl -s "$lidarrUrl/api/v1/metadataprofile/1?" -X PUT -H 'Content-Type: application/json' -H "X-Api-Key: ${lidarrApiKey}" --data-raw '{"name":"Standard","primaryAlbumTypes":[{"albumType":{"id":2,"name":"Single"},"allowed":true},{"albumType":{"id":4,"name":"Other"},"allowed":true},{"albumType":{"id":1,"name":"EP"},"allowed":true},{"albumType":{"id":3,"name":"Broadcast"},"allowed":true},{"albumType":{"id":0,"name":"Album"},"allowed":true}],"secondaryAlbumTypes":[{"albumType":{"id":0,"name":"Studio"},"allowed":true},{"albumType":{"id":3,"name":"Spokenword"},"allowed":true},{"albumType":{"id":2,"name":"Soundtrack"},"allowed":true},{"albumType":{"id":7,"name":"Remix"},"allowed":true},{"albumType":{"id":9,"name":"Mixtape/Street"},"allowed":true},{"albumType":{"id":6,"name":"Live"},"allowed":true},{"albumType":{"id":4,"name":"Interview"},"allowed":true},{"albumType":{"id":8,"name":"DJ-mix"},"allowed":true},{"albumType":{"id":10,"name":"Demo"},"allowed":true},{"albumType":{"id":1,"name":"Compilation"},"allowed":true}],"releaseStatuses":[{"releaseStatus":{"id":3,"name":"Pseudo-Release"},"allowed":false},{"releaseStatus":{"id":1,"name":"Promotion"},"allowed":false},{"releaseStatus":{"id":0,"name":"Official"},"allowed":true},{"releaseStatus":{"id":2,"name":"Bootleg"},"allowed":false}],"id":1}')
touch /config/logs/autoconfig
chmod 666 /config/logs/autoconfig
chown abc:abc /config/logs/autoconfig
} }
LidarrRootFolderCheck () { LidarrRootFolderCheck () {
@ -940,7 +947,13 @@ LidarrTaskStatusCheck () {
Configuration Configuration
if [ "$configureLidarrWithOptimalSettings" = "true" ]; then if [ "$configureLidarrWithOptimalSettings" = "true" ]; then
if [ ! -f /config/logs/autoconfig ]; then
ConfigureLidarrWithOptimalSettings ConfigureLidarrWithOptimalSettings
else
log ":: Lidarr previously configured with optimal settings, skipping..."
log ":: To re-configure Lidarr, delete the following file:"
log ":: /config/logs/autoconfig"
fi
fi fi
LidarrRootFolderCheck LidarrRootFolderCheck

Loading…
Cancel
Save