This script allows you to add new tasks to a transmission torrent client on router. It uses official python Dropbox SDK.
Please note, it requires a new Entware repository to work.
0. Install Dropbox API from my repo
1. Download script, attached to post
$ opkg install python-dropbox
2. Create access key for DropboxTorrentsWatch.py script
$ wget -O /opt/tmp/tmp.gz http://www.wl500g.info/attachment.php?attachmentid=8666&d=1330436107
$ gzip -cd /opt/tmp/tmp.gz > /opt/bin/DropboxTorrentsWatch.py
$ chmod +x /opt/bin/DropboxTorrentsWatch.py
$ rm /opt/tmp/tmp.gz
Log on to dropbox.com, proceed here, and create a new application with a unique name. Dropbox.com assigns APP_KEY, APP_SECRET pair to your application, please, write down those pair in appropriate script lines.
Dropbox uses OAuth. You have seen this on other sites, it sound like "Logon using Facebook" or "Logon using Google account". Please, run script with "-s" key:
Script offers you an URL, so copy it to browser. If all goes well, you will see this message. Press "Allow", go back to the router console and hit enter.
$ DropboxTorrentsWatch.py -s
4.Allow transmission to use watchdir feature
Make sure transmission is not running and edit settings.json:
$ grep -E "watch|trash" /opt/etc/transmission/settings.json
And make sure that REMOTE_DIR, LOCAL_DIR vars in script points to chosen Dropbox folder and to transmission watchdir folder.
Better run this script from cron, mine runs every five minutes.
Script checks your Dropbox folder, downloads new torrent files from here and gives it to transmission.
A sign that everything works well is disappearing of original torrent-files from the DropBox folder. This means router "took" them to work.