893 |
|] |
|] |
894 |
) files) |
) files) |
895 |
|
|
896 |
let display_file_list buf o = |
let print_bw_stats buf = |
897 |
display_vd := true; |
Printf.bprintf buf "Down: %.1f KB/s ( %d + %d ) | Up: %.1f KB/s ( %d + %d ) | Shared: %d/%s | Uploaded: %s" |
|
if not (use_html_mods o) then |
|
|
(* Printf.bprintf buf "Downloaded %d/%d files\n" (List.length !!done_files) |
|
|
(List.length !!files); *) |
|
|
Printf.bprintf buf "\nDown: %.1f KB/s ( %d + %d ) | Up: %.1f KB/s ( %d + %d ) | Shared: %d/%s" |
|
898 |
(( (float_of_int !udp_download_rate) +. (float_of_int !control_download_rate)) /. 1024.0) |
(( (float_of_int !udp_download_rate) +. (float_of_int !control_download_rate)) /. 1024.0) |
899 |
!udp_download_rate |
!udp_download_rate |
900 |
!control_download_rate |
!control_download_rate |
902 |
!udp_upload_rate |
!udp_upload_rate |
903 |
!control_upload_rate |
!control_upload_rate |
904 |
!nshared_files |
!nshared_files |
905 |
(size_of_int64 !upload_counter); |
(size_of_int64 !nshared_bytes) |
906 |
|
(size_of_int64 !upload_counter) |
907 |
|
|
908 |
|
let display_active_file_list buf o list = |
909 |
|
display_vd := true; |
910 |
|
|
911 |
|
if not (use_html_mods o) then begin |
912 |
|
(* Printf.bprintf buf "Downloaded %d/%d files\n" (List.length !!done_files) |
913 |
|
(List.length !!files); *) |
914 |
|
print_bw_stats buf; |
915 |
Printf.bprintf buf "\n"; |
Printf.bprintf buf "\n"; |
916 |
|
end; |
917 |
|
|
918 |
if o.conn_output <> HTML && !!improved_telnet then |
if o.conn_output <> HTML && !!improved_telnet then |
919 |
begin |
begin |
|
let list = List2.tail_map file_info !!files in |
|
920 |
let list = Sort.list (fun f1 f2 -> percent f1 >= percent f2) list in |
let list = Sort.list (fun f1 f2 -> percent f1 >= percent f2) list in |
921 |
simple_print_file_list false buf list o |
simple_print_file_list false buf list o |
922 |
end |
end |
923 |
else |
else |
|
let list = List2.tail_map file_info !!files in |
|
924 |
let list = |
let list = |
925 |
try |
try |
926 |
let sorter = |
let sorter = |
950 |
in |
in |
951 |
simple_print_file_list false buf list o |
simple_print_file_list false buf list o |
952 |
|
|
953 |
let display_file_list buf o = |
let display_file_list buf o l = |
954 |
display_file_list buf o; |
display_active_file_list buf o l; |
955 |
if not (use_html_mods o) then |
if not (use_html_mods o) then |
956 |
Printf.bprintf buf "%0sDownloaded %d files\n" (if !!term_ansi then "$n" else "") (List.length !!done_files); |
Printf.bprintf buf "%0sDownloaded %d files\n" (if !!term_ansi then "$n" else "") (List.length !!done_files); |
957 |
if !!done_files <> [] then begin |
if !!done_files <> [] then begin |