Logic
Monday 22nd August, 2005 00:32 Comments: 0
I just realised why the share ratio I display for each torrent doesn't fluctuate wildly like it used to on previous versions of the official BitTorrent client that I'd modified. I'd originally worked out the share ratio based on the amount of data uploaded against the amount of data downloaded (which is how the BitTornado client used to display it), but the client's original code (which I re-used this time around) compares the amount uploaded against the total size of the torrent. Because the BitTornado style method ends up with the amount downloaded being equal to the size of the torrent it would always behave the same when completed, no matter which method I use. So do I go back to the BitTornado style (which is more accurate if you only selected certain files from a torrent), which was a little more interesting to see, or do I stick wth the normal calculation (which assumes you will download all the files in a torrent, as that's all you can do so far)? Or do I make it into yet another option that the user can select? At least my logic isn't faulty, it just depends which logic you prefer to see in action.
With so many changes to the code in BitTorrent 4.1.4 it's given me the opportunity to add my modifications again from scratch, hopefully without all the bugs and mistakes I made along the way. I'm nearly there again (I think, the new TorrentQueue code is going to be a pain to amend), and I've already come across new things to add (as soon as I work out an elegant way to get the information between windows).
With so many changes to the code in BitTorrent 4.1.4 it's given me the opportunity to add my modifications again from scratch, hopefully without all the bugs and mistakes I made along the way. I'm nearly there again (I think, the new TorrentQueue code is going to be a pain to amend), and I've already come across new things to add (as soon as I work out an elegant way to get the information between windows).