mirror of
https://github.com/SinTan1729/random.git
synced 2025-04-11 13:46:04 -05:00
new: Move movies to Temp
This commit is contained in:
parent
4e8ad8caf1
commit
c0cce90f40
1 changed files with 14 additions and 6 deletions
20
qbt-send-msg.sh
Normal file → Executable file
20
qbt-send-msg.sh
Normal file → Executable file
|
@ -2,22 +2,30 @@
|
||||||
|
|
||||||
# A very simple script to send message using ntfy.sh whenever a torrent is added/completed
|
# A very simple script to send message using ntfy.sh whenever a torrent is added/completed
|
||||||
# in qBittorrent. Just call the script from qBittorrent's external script option
|
# in qBittorrent. Just call the script from qBittorrent's external script option
|
||||||
# using <script> "%N" "%Z" (add/fin)
|
# using <script> "%N" "%Z" fin "%L" "%F"
|
||||||
# It also adds trackers using https://github.com/Jorman/Scripts/blob/master/AddqBittorrentTrackers.sh
|
|
||||||
|
|
||||||
name="$1"
|
name="$1"
|
||||||
|
size="$2"
|
||||||
|
status="$3"
|
||||||
|
category="$4"
|
||||||
|
path="$5"
|
||||||
|
|
||||||
if [ "$3" == "add" ]; then
|
if [ "$status" == "add" ]; then
|
||||||
message="Added: $name"
|
message="Added: $name"
|
||||||
elif [ "$3" == "fin" ]; then
|
elif [ "$status" == "fin" ]; then
|
||||||
size="$(echo $2 | numfmt --to=iec --format %.2f)B"
|
size="$(echo $size | numfmt --to=iec --format %.2f)B"
|
||||||
message="Finished: [$size] $name"
|
message="Finished: [$size] $name"
|
||||||
|
if [ "$category" == "movie" ]; then
|
||||||
|
cp -lR "$path" /downloads/Temp/movie/
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -H "Icon: https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/New_qBittorrent_Logo.svg/240px-New_qBittorrent_Logo.svg.png" \
|
curl -H "Icon: https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/New_qBittorrent_Logo.svg/240px-New_qBittorrent_Logo.svg.png" \
|
||||||
|
-u :tk_8tdkqzsjaauqnngy9bc33wcuh3xq6 \
|
||||||
-H "Title: qBittorrent" \
|
-H "Title: qBittorrent" \
|
||||||
-H "Priority: low" \
|
-H "Priority: low" \
|
||||||
-d "$message" \
|
-d "$message" \
|
||||||
https://ntfy.sh/topic-name
|
https://ntfy.sintan1729.uk/qbittorrent
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue