Adding torrents via script?

General support for problems installing or using Deluge
Post Reply
aqtrans
Member
Member
Posts: 28
Joined: Fri Feb 08, 2008 4:07 pm

Adding torrents via script?

Post by aqtrans »

I see there is an option in the "null" interface, but I cannot figure out a way to add a torrent through a script without actually going into the interface. I wanted to try and make rssdler work with Deluge since we don't have a RSS plugin yet. Has anyone managed to add a torrent via just the command line, like

Code: Select all

deluge -u null add -p /media/bleh/; ./fringe.torrent;
andar
Top Bloke
Top Bloke
Posts: 1050
Joined: Fri Jun 08, 2007 8:38 pm
Location: Victoria, BC
Contact:

Re: Adding torrents via script?

Post by andar »

aqtrans wrote:I see there is an option in the "null" interface, but I cannot figure out a way to add a torrent through a script without actually going into the interface. I wanted to try and make rssdler work with Deluge since we don't have a RSS plugin yet. Has anyone managed to add a torrent via just the command line, like

Code: Select all

deluge -u null add -p /media/bleh/; ./fringe.torrent;
You could do it with python pretty easily..

http://dev.deluge-torrent.org/wiki/Development/UiClient
aqtrans
Member
Member
Posts: 28
Joined: Fri Feb 08, 2008 4:07 pm

Re: Adding torrents via script?

Post by aqtrans »

andar wrote:
aqtrans wrote:I see there is an option in the "null" interface, but I cannot figure out a way to add a torrent through a script without actually going into the interface. I wanted to try and make rssdler work with Deluge since we don't have a RSS plugin yet. Has anyone managed to add a torrent via just the command line, like

Code: Select all

deluge -u null add -p /media/bleh/; ./fringe.torrent;
You could do it with python pretty easily..

http://dev.deluge-torrent.org/wiki/Development/UiClient
Oh sweet, I was unaware of this. Could you recommend any python tutorials, I've only ever programmed in Java (even then I was no good) :P

EDIT: Disregard the last edit, I got it working. :D Time to try to get it to interface with rssdler.
Thanks for the help!
aqtrans
Member
Member
Posts: 28
Joined: Fri Feb 08, 2008 4:07 pm

Re: Adding torrents via script?

Post by aqtrans »

So far I've written this which takes 2 arguments, the torrent file and download directory, and it works awesomely. But I cannot figure out rssdlers' postDownloadFunction. It can supposedly take the filename of the torrent file and modify it, but I cannot get it to work.
andar
Top Bloke
Top Bloke
Posts: 1050
Joined: Fri Jun 08, 2007 8:38 pm
Location: Victoria, BC
Contact:

Re: Adding torrents via script?

Post by andar »

aqtrans wrote:So far I've written this which takes 2 arguments, the torrent file and download directory, and it works awesomely. But I cannot figure out rssdlers' postDownloadFunction. It can supposedly take the filename of the torrent file and modify it, but I cannot get it to work.
There is also the possibility of using the AutoAdd feature in the daemon. You could just watch a folder for torrent files and have your rss downloader just put the files in the watched folder. Might be an easier solution. I have no idea what rsslder is, so I can't really help you with it.
aqtrans
Member
Member
Posts: 28
Joined: Fri Feb 08, 2008 4:07 pm

Re: Adding torrents via script?

Post by aqtrans »

andar wrote:
aqtrans wrote:So far I've written this which takes 2 arguments, the torrent file and download directory, and it works awesomely. But I cannot figure out rssdlers' postDownloadFunction. It can supposedly take the filename of the torrent file and modify it, but I cannot get it to work.
There is also the possibility of using the AutoAdd feature in the daemon. You could just watch a folder for torrent files and have your rss downloader just put the files in the watched folder. Might be an easier solution. I have no idea what rsslder is, so I can't really help you with it.
That would work, I was trying to make each series download to a specific directory so I can watch them via XBMC.
RSSDler is great used in conjunction with rtorrent.
Post Reply