Last active
July 21, 2022 23:57
-
-
Save damoun/5020647 to your computer and use it in GitHub Desktop.
Send notification when transmission finished to download a file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/var/lib/transmission-daemon/notify.py $TR_TORRENT_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Install PushBullet module (https://github.com/randomchars/pushbullet.py) | |
# | |
# # pip install pushbullet.py | |
# | |
# Add path script to transmission settings.json | |
# | |
# { | |
# ... | |
# "script-torrent-done-enabled": true, | |
# "script-torrent-done-filename": "/var/lib/transmission-daemon/complete.sh", | |
# ... | |
# } | |
# | |
import sys | |
from pushbullet import PushBullet | |
apiKey = "secret" | |
p = PushBullet(apiKey) | |
# Get all devices | |
devices = p.devices() | |
# Send a note to all devices | |
[device.push_note('New download completed', sys.argv[1] + ' has been downloaded') for device in devices |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment