How KTorrent commanded to download a file sequentially

Boyd Stephen Smith Jr. bss at
Sun May 22 17:41:57 BST 2011

In <201105220658.33822.gheskett at>, gene heskett wrote:
>On Sunday, May 22, 2011 06:46:50 AM giovanni_re did opine:
>> A)  How can KTorrent be commanded to download a file sequentially
>> (without gaps), rather than pieces distributed randomly throughout the
>> file?
>That is how he torrent protocol works.  You are asking for an ftp style
>pull.  Torrents are generally pre-allocated on disk which reduces file
>fragmentation.  One thing I always do is when the gui says 100%, I stop it
>from the menu stop, verify that there are no processes left, and restart
>it, which causes the engine to recheck the download and fix any errors.

KTorrent for KDE 3 (can't remember the version) had a per-torrent operation to 
prefer early chunks when your client gets a choice.  This doesn't guarantee 
you get things completely in order, but it can (for example) get you enough 
headers for certain file types to get the metadata / preview / etc. earlier.

Yes, the torrent protocol doesn't really allow for in-order downloads exactly, 
but your client can request certain chunks first.

>> B)  How can KT be told:
>> 1) at first, only download on torrent1 until it is completely dl'd.
>> 2) then, switch to dl'ing 5 torrents simultaneously
>That I can't answer.  I do know there is some scripting ability, but its
>defaults have always Just Worked(TM) for me.  Some of its earlier gui's
>were a disaster, but the torrent engine worked fine.

I don't know a way to catch the notification that a torrent has been 
completed, but all the torrents and be stopped, started, and their status 
queried using the DBus interface in the most recent KTorrent versions.

So, you might be able to write a script to do what you want by regularly 
polling KTorrent.

The scheduler plug-in does time-based bandwidth restrictions (including 
stopping / starting all torrents), but it can't handle this particular use 
Boyd Stephen Smith Jr.                   ,= ,-_-. =.
bss at                   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy         `-'(. .)`-'                    \_/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <>
-------------- next part --------------
This message is from the kde mailing list.
Account management:
More info:

More information about the kde mailing list