File tree Expand file tree Collapse file tree 2 files changed +3
-21
lines changed
transmission/music/resources Expand file tree Collapse file tree 2 files changed +3
-21
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4- printenv | grep -i lidarr | sort
5-
64if [[ " $$ {lidarr_eventtype:-}" == " Test" ]]; then
75 echo " [lidarr-wrtag] Test event received"
86 exit 0
@@ -12,8 +10,9 @@ if [[ "$${lidarr_eventtype:-}" != "AlbumDownload" ]]; then
1210 exit 0
1311fi
1412
15- WRTAG_URL=" http://:$$ {WRTAG_API_KEY}@wrtag.media.svc.cluster.local/op/copy"
16- ALBUM_DIR=" $( dirname " $$ {lidarr_trackfile_path}" ) "
13+ WRTAG_URL=" http://:$$ {WRTAG_API_KEY}@wrtag.media.svc.cluster.local/op/move"
14+ FIRST_TRACK=" $( echo " $$ {lidarr_addedtrackpaths}" | cut -d' |' -f1) "
15+ ALBUM_DIR=" $( dirname " $$ {FIRST_TRACK}" ) "
1716
1817echo " [lidarr-wrtag] Notifying wrtag for: $$ {ALBUM_DIR}"
1918curl \
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4- DEST_BASE=" /music/transmission/wrtag"
5- # WRTAG_API_KEY="key" # replace with your actual wrtag API key
6- # WRTAG_URL="http://:${WRTAG_API_KEY}@127.0.0.1:7373/op/move"
7-
8- SOURCE=" $$ {TR_TORRENT_DIR}/$$ {TR_TORRENT_NAME}"
9- DEST=" $$ {DEST_BASE}/$$ {TR_TORRENT_NAME}"
10-
114if echo " $$ {TR_TORRENT_TRACKERS}" | grep -q " flacsfor.me" ; then
125 TRACKER=" red"
136elif echo " $$ {TR_TORRENT_TRACKERS}" | grep -q " home.opsfet.ch" ; then
2013echo " [transmission-complete] Generating gazelle-origin file for $$ {TR_TORRENT_NAME} (tracker: $$ {TRACKER})"
2114/app/.local/bin/gazelle-origin --tracker " $$ {TRACKER}" " $$ {TR_TORRENT_HASH}" --out " $$ {TR_TORRENT_DIR}/$$ {TR_TORRENT_NAME}/origin.yaml"
2215
23- echo " [transmission-complete] Copying '$$ {SOURCE}' → '$$ {DEST}'"
24- cp -rp " $$ {SOURCE}" " $$ {DEST}"
25-
26- # echo "[transmission-complete] Notifying wrtag: ${DEST}"
27- # curl \
28- # --fail \
29- # --request POST \
30- # --data-urlencode "path=${DEST}" \
31- # "${WRTAG_URL}"
32-
3316echo " [transmission-complete] Done."
You can’t perform that action at this time.
0 commit comments