[Kget] Re: bittorrent plugin

Felix Berger bflat1 at gmx.net
Mon Apr 18 16:29:15 CEST 2005


On Sunday 17 April 2005 17:19, Dario Massarin wrote:

I just commited the bittorrent code after making it work with the current 
framework.

> 1) In order to make kget use the bittorrent plugin you should make the
> future TransferBittorrentFactory::createTransfer(...) return a non-null
> pointer only if the given .torrent file is local. Otherwise it should
> return a null pointer, since the file isn't local and it should be
> downloaded with other plugins, such as the TransferKio one.

For now it was easier doing the comparatively small torrent file download 
myself, since the code was already there. We can disable that in the future 
if it makes sense.

> 2) Remember to make the plugin rank (see
> kget/core/plugin/kget_plugin.desktop) lower (we give it higher priority)
> than that of the TransferKio one.

I set it to 255, not sure which way it is, but it seemed to work :-)

Resuming does not work correctly and I should point out that the library is 
gpl'd and not LGPL, don't know if that's of any concern. Feel free to play 
with code and change it according to your needs, I won't be able to work on 
it at least for the next couple of weeks. But I'll still be able to answer 
questions, so don't hesitate to ask.

To make it work I had to link against:

libkgetbittorrent_la_LIBADD = ... ../../core/libcore.la \
	../../conf/libconf.la

This may be fine for plugins being developed inside of kget, but you should 
start using more unique names, since the libraries will have to be installed 
in /usr/lib at some point to allow external plugin development. Providing 
only one library a plugin developer would have to link against would also 
make sense for now.

Cheers,
Felix

-- 
Try Debian GNU/Linux!
http://www.felix.beldesign.de/



More information about the Kget mailing list