Post your execute plugin scripts!

Suggest, post, or discuss plugins for Deluge
mhertz
Leecher
Leecher
Posts: 85
Joined: Wed Jan 22, 2014 5:05 am
OS or Distro: Arch Linux

Re: Post your execute plugin scripts!

Postby mhertz » Thu Nov 17, 2016 8:14 pm

Have you specifically run the test script I posted through deluge's execute plugin? I don't mean running manually what you wrote above. It's to figure out if it's a deluge plugin bug or not?

My hunch is that it's probably just needed to do e.g.

torrentid="$1"
torrentname="$2"

In your original script.

Sorry, I can't test as am currently running qbittorrent-nox and not deluge(I go back and fourth often as can't decide fully, lol), and with that app's execute functionality I also have to play around with double-quotes in various arrangements to get it to work right with spaces in names/paths, though it's a shell-scripting issue and not app related. (I'm currently working on an execute script for that app which mimicks deluge's labelplus plugin's autolabels functionality to auto move downloaded content into different paths based on file-extensions, like *.(mkv|mp4|avi) into ~/video and music into ~/music etc. and cleanup/delete useless crap like *.(txt|nfo) etc)

romprod
New User
New User
Posts: 9
Joined: Mon Jun 29, 2015 8:56 pm
OS or Distro: Linux

Re: Post your execute plugin scripts!

Postby romprod » Thu Jan 12, 2017 10:06 am

Hi,

Is there a way to see the output of this plugin when it launches a .bat file from windows.

It's a royal PITA trying to debug my script blind folded! :)

Thanks.

saadbruno
New User
New User
Posts: 2
Joined: Thu Feb 09, 2017 10:51 pm
OS or Distro: Raspbian

Re: Post your execute plugin scripts!

Postby saadbruno » Thu Feb 09, 2017 11:06 pm

I have a few scrips now.

The first one is to download subtitles for completed torrents using Subliminal.

Code: Select all

#!/bin/bash
#Script to run subliminal on newly downloaded torrents and generate a log file.

torrentid="$1"
torrentname="$2"
torrentpath="$3"

subliminal --opensubtitles <user> <passwd> --legendastv <user> <passwd> download -w 1 -l pt-BR -a 1h -v "$torrentpath"


The second and third ones are to send a notification to my phone (using IFTTT's Maker Channel) when a torrent is added and completed. I use that because we run Deluge on a shared Raspberry Pi in the house (and I like to know when people add stuff to it).

Torrent added:

Code: Select all

#!/bin/bash
# Send IFTTT notification when torrent is added.

torrentid="$1"
torrentname="$2"
torrentpath="$3"

curl -X POST -H "Content-Type: application/json" -d '{"value1":"'"$torrentid"'","value2":"'"$torrentname"'","value3":"'"$torrentpath"'"}' https://maker.ifttt.com/trigger/deluge_add/with/key/<ifttt_key>


IFTTT Maker Channel config:
Event Name: deluge_add
Notification: Torrent Added! Name: "{{Value2}}"

Torrent completed:

Code: Select all

#!/bin/bash
# Send IFTTT notification when torrent is completed.

torrentid="$1"
torrentname="$2"
torrentpath="$3"

curl -X POST -H "Content-Type: application/json" -d '{"value1":"'"$torrentid"'","value2":"'"$torrentname"'","value3":"'"$torrentpath"'"}' https://maker.ifttt.com/trigger/deluge_complete/with/key/<ifttt_key>

IFTTT Maker Channel config:
Event Name: deluge_complete
Notification: Torrent Downloaded! Name: "{{Value2}}" Path: "{{Value3}}" At: {{OccurredAt}}


Return to “Plugins”

Who is online

Users browsing this forum: No registered users and 28 guests