Skip to content

Commit

Permalink
refactor: update bash scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Aug 31, 2024
1 parent 9428ad5 commit 1ea3645
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ set_sab_vars() {

# Function to set release variables from qBittorrent
set_qb_vars() {
RELEASE_NAME="$1" # %N
RELEASE_DIR="$2" # %F
RELEASE_CAT="$3" # %L
RELEASE_SIZE="$4" # %Z
RELEASE_INDEXER="$5" # %T
RELEASE_STATUS=0
RELEASE_NAME="$1" # %N
RELEASE_DIR="$2" # %F
RELEASE_CAT="$3" # %L
RELEASE_SIZE="$4" # %Z
RELEASE_INDEXER="$5" # %T
RELEASE_STATUS=0 # Always 0 for qBittorrent
RELEASE_TYPE="Torrent"
}

Expand All @@ -40,7 +40,7 @@ send_pushover_notification() {
"<b>%s</b><small>\n<b>Category:</b> %s</small><small>\n<b>Indexer:</b> %s</small><small>\n<b>Size:</b> %s</small>" \
"${RELEASE_NAME%.*}" \
"${RELEASE_CAT}" \
"$(echo "${RELEASE_INDEXER}" | sed -E 's|^[^/]*//([^/]*).*|\1|')" \
"$(trurl --url "${RELEASE_INDEXER}" --get '{idn:host}')" \
"$(numfmt --to iec --format "%8.2f" "${RELEASE_SIZE}")"

json_data=$(jo \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ set_sab_vars() {

# Function to set release variables from qBittorrent
set_qb_vars() {
RELEASE_NAME="$1" # %N
RELEASE_DIR="$2" # %F
RELEASE_CAT="$3" # %L
RELEASE_SIZE="$4" # %Z
RELEASE_INDEXER="$5" # %T
RELEASE_STATUS=0
RELEASE_NAME="$1" # %N
RELEASE_DIR="$2" # %F
RELEASE_CAT="$3" # %L
RELEASE_SIZE="$4" # %Z
RELEASE_INDEXER="$5" # %T
RELEASE_STATUS=0 # Always 0 for qBittorrent
RELEASE_TYPE="Torrent"
}

Expand All @@ -40,7 +40,7 @@ send_pushover_notification() {
"<b>%s</b><small>\n<b>Category:</b> %s</small><small>\n<b>Indexer:</b> %s</small><small>\n<b>Size:</b> %s</small>" \
"${RELEASE_NAME%.*}" \
"${RELEASE_CAT}" \
"$(echo "${RELEASE_INDEXER}" | sed -E 's|^[^/]*//([^/]*).*|\1|')" \
"$(trurl --url "${RELEASE_INDEXER}" --get '{idn:host}')" \
"$(numfmt --to iec --format "%8.2f" "${RELEASE_SIZE}")"

json_data=$(jo \
Expand Down

0 comments on commit 1ea3645

Please sign in to comment.