Registered Member
|
Hi all,
I recently upgraded to KT 4.0.1. I found it very useful, in particular the separation with libktorrent. I tried to custom as possible (I'm not so skilled in programming) the interface. I added three columns in FileView widget, where you see the filelist in the torrent: first chunk, total chunk, remaining chunk. The last one made me to modify libktorrent package, to return a protected variable. Do you think this patch colud be useful? I used Azureus in the past, i liked the fullness of infos, but KT is much better (first of all, because i use KDE....) Byz Dave PS: don't blame me for my english, I know myself.... |
Registered Member
|
|
Registered Member
|
there are two patch for ktorrent and one for libktorrent (needed to get remaining chunks in a multifile torrent):
in the latest patch, i realize now i could put the return directly in .h declaration, without modifying the .cpp What do you think about? Do you it might be a reasonable feature? [Attached patches below]
Last edited by gengisdave on Sun Jun 27, 2010 11:21 am, edited 1 time in total.
|
Moderator
|
Looking at your patches, I find the term remaining chunks a bit confusing, certainly if you use it for the number of chunks downloaded of a file.
|
Registered Member
|
Yes, it's a mistake. At a first look, i thought class bt had a protected variable for remaining chunks, so I called the function getRemainingChunks. After, I realized that num_chunks_downloaded, means "number of chunks download in a file". I didn't change the function name. Or, I can return from libktorrent the remaining chunks count. PS: can you give me a little hint to easy create patch file? I use patch from command line, but if there's a program to create patch on the fly from official source, i will be very happy... |
Registered Member
|
Thanks to George who makes me clear about my "obfuscated" code, I changed the patch. Think they are right. Now getRemainingChunks returns really the chunks remaining in a file... this should be obvious? I'm a programmer...
Patch in libktorrent now returns value directly from function declaration. The rest it's unchanged, apart case 7. PS: for english language programmers: do you use disney's name for variables? Like goofy, donal_duck or uncle_scrooge? In italian universities, professors themselves use them by default, like "pippo" , "pluto" and "paperino", these are the three most variable names used in program examples. |
Moderator
|
Checkout from svn, and use svn diff to generate patches, much easier. Will take a look at your patches. |
Moderator
|
OK, it took a bit longer then expected, but I have finally gotten around to your patches.
Some small issues: - Models can return integers, so there are a bunch of useless string conversions which can be removed - Remaining Chunk -> Remaining Chunks The question now remains, is this useful information to be shown. Need to think about that. |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]