|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
scriptVersion="1.0.1"
|
|
|
|
|
scriptVersion="1.0.2"
|
|
|
|
|
|
|
|
|
|
if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
|
|
|
|
|
arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
|
|
|
|
@ -23,9 +23,17 @@ chmod 666 "/config/logs/AutoConfig.txt"
|
|
|
|
|
|
|
|
|
|
log () {
|
|
|
|
|
m_time=`date "+%F %T"`
|
|
|
|
|
echo $m_time" :: AutoConfig :: "$1
|
|
|
|
|
echo $m_time" :: AutoConfig :: $scriptVersion :: "$1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if [ -f /config/extended/logs/autoconfig ]; then
|
|
|
|
|
log "Sonarr previously configured with optimal settings, skipping..."
|
|
|
|
|
log "To re-configure Sonarr, delete the following file:"
|
|
|
|
|
log "/config/extended/logs/autoconfig"
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log "Getting Trash Guide Recommended Sonarr Naming..."
|
|
|
|
|
standardNaming="$(curl -s "https://raw.githubusercontent.com/TRaSH-/Guides/master/docs/Sonarr/Sonarr-recommended-naming-scheme.md" | grep "{Series" | head -n 1)"
|
|
|
|
|
dailyNaming="$(curl -s "https://raw.githubusercontent.com/TRaSH-/Guides/master/docs/Sonarr/Sonarr-recommended-naming-scheme.md" | grep "{Series" | grep "{Air-Date}")"
|
|
|
|
@ -114,4 +122,7 @@ else
|
|
|
|
|
log "Complete"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
touch /config/extended/logs/autoconfig
|
|
|
|
|
chmod 666 /config/extended/logs/autoconfig
|
|
|
|
|
|
|
|
|
|
exit
|
|
|
|
|