Skip to content

Commit

Permalink
Merge pull request #192 from Drazzilb08/dev
Browse files Browse the repository at this point in the history
Update to v.1.2.3
  • Loading branch information
Drazzilb08 authored Oct 4, 2024
2 parents 5a0724b + 013fc3e commit 156ef85
Show file tree
Hide file tree
Showing 11 changed files with 188 additions and 221 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ web/
**/.DS_Store
**/TODO.*
**test**
**side-projects**

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.2
1.2.3
22 changes: 22 additions & 0 deletions config/config.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,26 @@ poster_cleanarr:

upgradinatorr:
# A script to upgrade Sonarr/Radarr libraries to the keep in line with trash-guides
# count: Number of items to search.
# tag_name: The name of the tag to add to items that have been processed.
# ignore_tag: The name of the tag to ignore.
# unattended: If true, the script will remove the checked_tag if all media is tagged, resulting in this running forever.
# season_monitored_threshold: (Sonarr only) The episode monitoring threshold to filter out seasons.
# If the monitored percentage of episodes in a season is less than this threshold, the season will be skipped.
# Example: season_monitored_threshold: 0.5 means 50% of episodes in a season must be monitored for the season to be searched.
# Default: 0 (disables the threshold, seasons will not be skipped based on episode monitoring).

# Examples:
# The following configuration will process up to 1 item from the 'sonarr_1' instance, using 'checked' as the tag name
# and 'ignore' as the ignore tag. It will operate in unattended mode, and only search seasons if at least 50%
# of their episodes are monitored.
#
# sonarr_1:
# count: 1
# tag_name: checked
# ignore_tag: ignore
# unattended: true
# season_monitored_threshold: 0.5
log_level: info
dry_run: false
instances:
Expand All @@ -352,11 +372,13 @@ upgradinatorr:
tag_name: checked
ignore_tag: ignore
unattended: true
season_monitored_threshold: 0.99
sonarr_3:
count: 20
tag_name: checked
ignore_tag: ignore
unattended: true
season_monitored_threshold: 0.5

renameinatorr:
# This script will rename all series in Sonarr/Radarr to match the naming scheme of the
Expand Down
12 changes: 6 additions & 6 deletions extra-scripts/backup_appdata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -562,20 +562,20 @@ send_notification() {
# Get a random joke from the specified file
# Check if the webhook is for discord
if [[ "$webhook" =~ ^https://discord\.com/api/webhooks/ ]]; then
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
discord_common_fields
bot_name="Notification Bot"
# Call the discord_payload function to construct the payload
if [ ${#new_container[@]} -gt 0 ]; then
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
new_container_notification
new_container_response=$(curl -s -H "Content-Type: application/json" -X POST -d "$payload" "$webhook")
if [ "$dry_run" == "true" ]; then
echo "$new_container_response"
fi
fi
if [ ${#removed_containers[@]} -gt 0 ]; then
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
removed_container_notification
removed_container=$(curl -s -H "Content-Type: application/json" -X POST -d "$payload" "$webhook")
if [ "$dry_run" == "true" ]; then
Expand All @@ -594,19 +594,19 @@ send_notification() {
fi
# Check if the webhook is for notifiarr
if [[ $webhook =~ ^https://notifiarr\.com/api/v1/notification/passthrough ]]; then
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
notifiarr_common_fields
# Call the notifiarr_payload function to construct the payload
if [ ${#new_container[@]} -gt 0 ]; then
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
new_container_notification
new_container_response=$(curl -s -H "Content-Type: application/json" -X POST -d "$payload" "$webhook")
if [ "$dry_run" == "true" ]; then
echo "$new_container_response"
fi
fi
if [ ${#removed_containers[@]} -gt 0 ]; then
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
removed_container_notification
removed_container=$(curl -s -H "Content-Type: application/json" -X POST -d "$payload" "$webhook")
if [ "$dry_run" == "true" ]; then
Expand Down
2 changes: 1 addition & 1 deletion extra-scripts/backup_folder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ send_notification() {
# Get current time in UTC format
get_ts=$(date -u -Iseconds)
# Get a random joke from the specified file
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
# Check if the webhook is for discord
if [[ $webhook =~ ^https://discord\.com/api/webhooks/ ]]; then
# Call the discord_payload function to construct the payload
Expand Down
6 changes: 1 addition & 5 deletions extra-scripts/backup_plex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,7 @@ field_builder() {
build_payload(){
get_ts=$(date -u -Iseconds)
# Get a random joke from the specified file
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1)
# ensure joke is valid for json
# shellcheck disable=SC2001
joke=$(echo "$joke" | sed 's/"/\\"/g')
# ensure jokes is valid for json
joke=$(curl -s https://raw.githubusercontent.com/Drazzilb08/daps/master/jokes.txt | shuf -n 1 | sed 's/"/\\"/g')
if [[ $webhook =~ ^https://discord\.com/api/webhooks/ ]]; then
bot_name="Notification Bot"
title="name"
Expand Down
Loading

0 comments on commit 156ef85

Please sign in to comment.