";
echo "tqStatus: | ";
switch ($t['status']) {
case 0:
echo "NOT_STARTED | ";
break;
case 1:
echo "SEEDING_COMPLETE | ";
break;
case 2:
echo "DOWNLOAD_COMPLETE | ";
break;
case 3:
echo "SEEDING | ";
break;
case 4:
echo "DOWNLOADING | ";
break;
case 5:
echo "STALLED | ";
break;
case 6:
echo "STOPPED | ";
break;
case 7:
echo "ALLOCATING_DISKSPACE | ";
break;
case 8:
echo "ERROR | ";
break;
case 9:
echo "QUEUED | ";
break;
case 10:
echo "CHECKING_DATA | ";
break;
default:
echo "Not supported tqStatus | ";
}
echo "";
echo "";
echo "Down speed: | ";
echo "{$t['download_rate']} | ";
echo "
";
echo "";
echo "Up speed: | ";
echo "{$t['upload_rate']} | ";
echo "
";
echo "";
echo "Complete: | ";
$perc = round(100.0 - ($t['bytes_left_to_download'] / $t['total_bytes_to_download']) * 100.0, 2);
echo "$perc % | ";
echo "
";
?>