developing plugin: how to open torrent from url?

Suggestions and discussion of future versions
Post Reply
SatNav
Member
Member
Posts: 25
Joined: Sat Jun 02, 2007 9:52 pm
Location: Lincoln, UK

developing plugin: how to open torrent from url?

Post by SatNav »

Hey. I'm making an RSS torrent plugin. It's now pretty much in a useable state, the only thing missing is the final part: how to open a torrent from a url.

I'm hoping there's a simple call which I can provide with a url, and it will just go - is this right? Can one of the developers give me the code i need to use, or just point me in the right direction please?

Sorry to be a pain - I glanced at the development wiki, but the documentation is kinda limited :)

Ta,
Mark
markybob
Compulsive Poster
Compulsive Poster
Posts: 1230
Joined: Thu May 24, 2007 11:27 pm
Location: Chicago, IL, USA
Contact:

Re: developing plugin: how to open torrent from url?

Post by markybob »

SatNav wrote:Hey. I'm making an RSS torrent plugin. It's now pretty much in a useable state, the only thing missing is the final part: how to open a torrent from a url.

I'm hoping there's a simple call which I can provide with a url, and it will just go - is this right? Can one of the developers give me the code i need to use, or just point me in the right direction please?

Sorry to be a pain - I glanced at the development wiki, but the documentation is kinda limited :)

Ta,
Mark
in interface, add_torrent_url(url)
jorge.vargas
Member
Member
Posts: 14
Joined: Wed Jun 27, 2007 8:50 pm

Re: developing plugin: how to open torrent from url?

Post by jorge.vargas »

SatNav wrote:Hey. I'm making an RSS torrent plugin. It's now pretty much in a useable state, the only thing missing is the final part: how to open a torrent from a url.

I'm hoping there's a simple call which I can provide with a url, and it will just go - is this right? Can one of the developers give me the code i need to use, or just point me in the right direction please?

Sorry to be a pain - I glanced at the development wiki, but the documentation is kinda limited :)

Ta,
Mark
well it turns out I'm doing one too. Should we join efforts? mine is close to finish the only thing it's missing is the GTK UI because I don't know how to code it.

As for the call for some reason add_torrent_url wasn't working for me and I got it working with.

interface.external_add_url(url)

although that's doing a lot of work in the background and it takes a lot to process, but it works :)
SatNav
Member
Member
Posts: 25
Joined: Sat Jun 02, 2007 9:52 pm
Location: Lincoln, UK

Re: developing plugin: how to open torrent from url?

Post by SatNav »

Hey Jorge. Thank you for the kind offer to work together, but from reading your other post about your plugin, I think we're taking opposite approaches to the idea. Yours uses negative filtering, whereas mine uses positive. Plus, as I said, mine was pretty much done in terms of the core functionality (in fact I've released it on the plugins board), so now I'm just adding bells and whistles.

I think there's room for both of our plugins to coexist without treading on each others toes too much :) I'll still be watching yours, and will be interested to see how it turns out.

Thanks for the tip about using external_add_url. I was using add_torrent_url, which seems to work ok for me, except that when you try to delete the added torrents or move them up or down in the list, it throws a "Missing Handle Error". I tried external_add_url method, but that still gave me the same problem, and as you said, takes ages.

As for the GUI, thats not very hard to do at all. I simply used Glade to design the interface, then figured out how to hook it all up through looking at the included plugins and the PyGTK reference manual. The bits I had the most trouble with were all the abstract data types, like treeview models, selections, iters and that kind of thing - but I get the feeling yours won't be as GUI heavy as mine.

laters,
Mark
Post Reply