bittorrent support

Mathias Panzenböck grosser.meister.morti at gmx.net
Sun Apr 25 17:17:42 CEST 2010


I thought about how one can integrate bittorrent feed support into amarok. Hard coding that 
.bittorrent extensions shall be opened with ktorrent is no option. Blindly executing the associated 
KDE applications to unknown file types is also unhandy.

Maybe there should be some kind of script hook for podcasts, so that when a file was downloaded this 
script is called with the file name as argument, which then decides what to do with it, if anything. 
Then one can write a script that calls ktorrent (e.g. via dbus) and commands it to download the file 
(to the appropriate directory, if one can tell that to ktorrent via dbus). Also other scripts can be 
written, e.g. one for arureus/vuze or just to start the associated KDE application.

Maybe make this script hook not just for new podcasts but for whenever the collection manager finds 
a new file (which don't need to be of a supported file type in order to get passed to the script)?

Maybe one of:
Amarok.Podcasts.unknownFiletype.connect(function(filename, mimetype) { });
Amarok.Podcasts.newFile.connect(function(filename, mimetype) { });
Amarok.Podcasts.newFileCallback('application/x-bittorrent', function(filename, mimetype) { });
Amarok.Collection.unknownFiletype.connect(function(filename, mimetype) { });
Amarok.Collection.newFile.connect(function(filename, mimetype) { });
Amarok.Collection.newFileCallback('application/x-bittorrent', function(filename, mimetype) { });

What do you think? Good idea? Bad idea? Is there a better idea for bittorrent integration? Or is 
bittorrent integration maybe not wanted in amarok?

	-panzi


More information about the Amarok-devel mailing list