Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
v1.0.4 - Bug Fixes for V4!
Browse files Browse the repository at this point in the history
Everything should now work.... #11
  • Loading branch information
RandomNinjaAtk committed Dec 8, 2022
1 parent 32fef2e commit 05aae07
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions root/scripts/AutoConfig.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.3"
scriptVersion="1.0.4"

if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
Expand Down Expand Up @@ -36,16 +36,16 @@ 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}")"
animeNaming="$(curl -s "https://raw.githubusercontent.com/TRaSH-/Guides/master/docs/Sonarr/Sonarr-recommended-naming-scheme.md" | grep "{Series" | grep "{absolute")"
seriesNaming="$(curl -s "https://raw.githubusercontent.com/TRaSH-/Guides/master/docs/Sonarr/Sonarr-recommended-naming-scheme.md" | grep "{Series" | head -n4 | tail -n1)"
standardNaming="$(curl -s "https://raw.githubusercontent.com/TRaSH-/Guides/master/docs/Sonarr/Sonarr-recommended-naming-scheme.md" | grep "{Series" | sed -n 2p | sed 's/^ *//')"
dailyNaming="$(curl -s "https://raw.githubusercontent.com/TRaSH-/Guides/master/docs/Sonarr/Sonarr-recommended-naming-scheme.md" | grep "{Series" | grep "{Air-Date}" | sed -n 2p | sed 's/^ *//')"
animeNaming="$(curl -s "https://raw.githubusercontent.com/TRaSH-/Guides/master/docs/Sonarr/Sonarr-recommended-naming-scheme.md" | grep "{Series" | grep "{absolute" | sed -n 2p | sed 's/^ *//')"
seriesNaming="$(curl -s "https://raw.githubusercontent.com/TRaSH-/Guides/master/docs/Sonarr/Sonarr-recommended-naming-scheme.md" | grep "{Series" | head -n7 | tail -n1)"

log "Updating Sonarr File Naming..."
updateArr=$(curl -s "$arrUrl/api/v3/config/naming" -X PUT -H "Content-Type: application/json" -H "X-Api-Key: $arrApiKey" --data-raw "{
\"renameEpisodes\":true,
\"replaceIllegalCharacters\":true,
\"multiEpisodeStyle\":4,
\"multiEpisodeStyle\":5,
\"standardEpisodeFormat\":\"$standardNaming\",
\"dailyEpisodeFormat\":\"$dailyNaming\",
\"animeEpisodeFormat\":\"$animeNaming\",
Expand Down

0 comments on commit 05aae07

Please sign in to comment.