systemart / rtgui

Automatically exported from code.google.com/p/rtgui
0 stars 0 forks source link

workaround for the negative numbers problem for seeded column #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In addition to the fixes which were provided in Issue 42
(http://code.google.com/p/rtgui/issues/detail?id=42)

The following will fix the file size displayed for the Seeded column

In functions.php:

Instead of using the following to get seeded total 
$retarr[$index]['up_total']=$item[47];

Use 
$retarr[$index]['up_total']=$item[36] * $item[3] * ($item[34]/1000);

This calculates size_chunks * chunk_size * ratio which will result in
correct numbers being displayed for all seeded totals. 

Original issue reported on code.google.com by ama...@gmail.com on 20 Dec 2008 at 7:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
In addition my rtgui was incorrectly displaying torrents as 'Leeching' even 
though
they had finished. Not sure if others are experiencing this but here is how I 
fixed
it. Replaced the following in functions.php:

if ($retarr[$index]['is_active']==1 &&
$retarr[$index]['connection_current']=="leech")
$retarr[$index]['status_string']="Leeching";

with

if ($retarr[$index]['is_active']==1 &&
$retarr[$index]['completed_bytes']==$retarr[$index]['size_bytes'])
$retarr[$index]['status_string']="Seeding";
if ($retarr[$index]['is_active']==1 &&
$retarr[$index]['completed_bytes']<$retarr[$index]['size_bytes'])
$retarr[$index]['status_string']="Leeching";

Therefore if completed_bytes = size_bytes it's seeding. And if completed_bytes <
size_bytes it's leeching.

Original comment by daede...@gmail.com on 21 Dec 2008 at 3:53

GoogleCodeExporter commented 9 years ago
Even better is:
if ($retarr[$index]['is_active']==1 && $retarr[$index]['complete']==1)
$retarr[$index]['status_string']="Seeding";
if ($retarr[$index]['is_active']==1 && $retarr[$index]['complete']<>1)
$retarr[$index]['status_string']="Leeching";

Original comment by daede...@gmail.com on 21 Dec 2008 at 4:10

GoogleCodeExporter commented 9 years ago
I'm fairly sure that other issue was fixed in 0.2.6 in either case you should 
open
another ticket for it as it is not related to this issue.

Original comment by ama...@gmail.com on 21 Dec 2008 at 4:45

GoogleCodeExporter commented 9 years ago
Thanks Amacie for the code - this will be added to next release of rtGui.

As for Daedelus, see http://code.google.com/p/rtgui/issues/detail?id=59 and 
please 
open a new ticket for a new problem if it's not related.

Original comment by lemonbe...@gmail.com on 8 Jan 2009 at 8:38

GoogleCodeExporter commented 9 years ago
Fixed in version 0.2.7

Original comment by lemonbe...@gmail.com on 16 Mar 2009 at 10:19