Skip to content

Commit 156ef85

Browse files
authored
Merge pull request #192 from Drazzilb08/dev
Update to v.1.2.3
2 parents 5a0724b + 013fc3e commit 156ef85

11 files changed

+188
-221
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ web/
6262
**/.DS_Store
6363
**/TODO.*
6464
**test**
65+
**side-projects**
6566

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.2
1+
1.2.3

config/config.sample.yml

+22
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,26 @@ poster_cleanarr:
329329

330330
upgradinatorr:
331331
# A script to upgrade Sonarr/Radarr libraries to the keep in line with trash-guides
332+
# count: Number of items to search.
333+
# tag_name: The name of the tag to add to items that have been processed.
334+
# ignore_tag: The name of the tag to ignore.
335+
# unattended: If true, the script will remove the checked_tag if all media is tagged, resulting in this running forever.
336+
# season_monitored_threshold: (Sonarr only) The episode monitoring threshold to filter out seasons.
337+
# If the monitored percentage of episodes in a season is less than this threshold, the season will be skipped.
338+
# Example: season_monitored_threshold: 0.5 means 50% of episodes in a season must be monitored for the season to be searched.
339+
# Default: 0 (disables the threshold, seasons will not be skipped based on episode monitoring).
340+
341+
# Examples:
342+
# The following configuration will process up to 1 item from the 'sonarr_1' instance, using 'checked' as the tag name
343+
# and 'ignore' as the ignore tag. It will operate in unattended mode, and only search seasons if at least 50%
344+
# of their episodes are monitored.
345+
#
346+
# sonarr_1:
347+
# count: 1
348+
# tag_name: checked
349+
# ignore_tag: ignore
350+
# unattended: true
351+
# season_monitored_threshold: 0.5
332352
log_level: info
333353
dry_run: false
334354
instances:
@@ -352,11 +372,13 @@ upgradinatorr:
352372
tag_name: checked
353373
ignore_tag: ignore
354374
unattended: true
375+
season_monitored_threshold: 0.99
355376
sonarr_3:
356377
count: 20
357378
tag_name: checked
358379
ignore_tag: ignore
359380
unattended: true
381+
season_monitored_threshold: 0.5
360382

361383
renameinatorr:
362384
# This script will rename all series in Sonarr/Radarr to match the naming scheme of the

extra-scripts/backup_appdata.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -562,20 +562,20 @@ send_notification() {
562562
# Get a random joke from the specified file
563563
# Check if the webhook is for discord
564564
if [[ "$webhook" =~ ^https://discord\.com/api/webhooks/ ]]; then
565-
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
565+
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
566566
discord_common_fields
567567
bot_name="Notification Bot"
568568
# Call the discord_payload function to construct the payload
569569
if [ ${#new_container[@]} -gt 0 ]; then
570-
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
570+
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
571571
new_container_notification
572572
new_container_response=$(curl -s -H "Content-Type: application/json" -X POST -d "$payload" "$webhook")
573573
if [ "$dry_run" == "true" ]; then
574574
echo "$new_container_response"
575575
fi
576576
fi
577577
if [ ${#removed_containers[@]} -gt 0 ]; then
578-
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
578+
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
579579
removed_container_notification
580580
removed_container=$(curl -s -H "Content-Type: application/json" -X POST -d "$payload" "$webhook")
581581
if [ "$dry_run" == "true" ]; then
@@ -594,19 +594,19 @@ send_notification() {
594594
fi
595595
# Check if the webhook is for notifiarr
596596
if [[ $webhook =~ ^https://notifiarr\.com/api/v1/notification/passthrough ]]; then
597-
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
597+
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
598598
notifiarr_common_fields
599599
# Call the notifiarr_payload function to construct the payload
600600
if [ ${#new_container[@]} -gt 0 ]; then
601-
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
601+
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
602602
new_container_notification
603603
new_container_response=$(curl -s -H "Content-Type: application/json" -X POST -d "$payload" "$webhook")
604604
if [ "$dry_run" == "true" ]; then
605605
echo "$new_container_response"
606606
fi
607607
fi
608608
if [ ${#removed_containers[@]} -gt 0 ]; then
609-
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
609+
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
610610
removed_container_notification
611611
removed_container=$(curl -s -H "Content-Type: application/json" -X POST -d "$payload" "$webhook")
612612
if [ "$dry_run" == "true" ]; then

extra-scripts/backup_folder.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ send_notification() {
202202
# Get current time in UTC format
203203
get_ts=$(date -u -Iseconds)
204204
# Get a random joke from the specified file
205-
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
205+
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
206206
# Check if the webhook is for discord
207207
if [[ $webhook =~ ^https://discord\.com/api/webhooks/ ]]; then
208208
# Call the discord_payload function to construct the payload

extra-scripts/backup_plex.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,7 @@ field_builder() {
223223
build_payload(){
224224
get_ts=$(date -u -Iseconds)
225225
# Get a random joke from the specified file
226-
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
227-
# ensure joke is valid for json
228-
# shellcheck disable=SC2001
229-
joke=$(echo "$joke" | sed 's/"/\\"/g')
230-
# ensure jokes is valid for json
226+
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
231227
if [[ $webhook =~ ^https://discord\.com/api/webhooks/ ]]; then
232228
bot_name="Notification Bot"
233229
title="name"

0 commit comments

Comments
 (0)