bittorrent support

Bart Cerneels bart.cerneels at kde.org
Mon Apr 26 10:43:39 CEST 2010


On Mon, Apr 26, 2010 at 09:53, Mark Kretschmann <kretschmann at kde.org> wrote:
> On Mon, Apr 26, 2010 at 9:35 AM, Mathias Panzenböck
> <grosser.meister.morti at gmx.net> wrote:
>> On 04/26/2010 08:58 AM, Bart Cerneels wrote:
>>> On Sun, Apr 25, 2010 at 17:17, Mathias Panzenböck
>>> <grosser.meister.morti at gmx.net>  wrote:
>>>> 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
>>>
>>> Really, how many podcasts use bittorrent enclosures exclusively? Can
>>> you give me 10 examples of podcast feeds that contain neither an audio
>>> nor a video file and don't have an alternative feed?
>>>
>>> I think this is pretty useless feature creep.
>>>
>>> Bart
>>
>> I don't even listen to/know 10 podcasts! But one of them uses bittorrent and it really needs it (the
>> http download alternative is very VERY slow). Yes, directly integrating bittorrent support would be
>> feature creep, but extending the JavaScript API so one can do this as an extension would IMHO be
>> not. Do you really think so?
>
> I don't know, the "just delegate to scripts" approach has bitten us
> before. We tried that with Transcoding in 1.x, and that was mostly a
> giant failure. What we ended up with was a fragile, complicated, and
> not really portable system.
>
> Some things should be integrated properly (with a BitTorrent library,
> certainly not by calling some binary), or not done at all.
>
> --
> Mark Kretschmann

I agree. If we really decide to integrate bittorrent it should be done
properly and not some script hack.

So it depends on a library available to integrate torrent downloads.
I'm not sure about the KPart. Seems better to have as minimal GUI
difference with a regular download as possible.

Seems like Mathias has an itch to scratch, so perhaps we'll have BT
podcasts one day.


More information about the Amarok-devel mailing list