/[mldonkey]/mldonkey/src/daemon/common/commonInteractive.ml
ViewVC logotype

Diff of /mldonkey/src/daemon/common/commonInteractive.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36 by spiralvoice, Mon Jun 20 18:42:09 2005 UTC revision 1.37 by spiralvoice, Tue Jun 28 22:48:13 2005 UTC
# Line 197  let file_cancel file = Line 197  let file_cancel file =
197    with e ->    with e ->
198        lprintf "Exception in file_cancel: %s\n" (Printexc2.to_string e)        lprintf "Exception in file_cancel: %s\n" (Printexc2.to_string e)
199    
200            let time_to_string time =
201      let days = time / 60 / 60 / 24 in
202      let rest = time - days * 60 * 60 * 24 in
203      let hours = rest / 60 / 60 in
204      let rest = rest - hours * 60 * 60 in
205      let minutes = rest / 60 in
206      let seconds = rest - minutes * 60 in
207        if days > 0
208        then Printf.sprintf " %dd " days
209        else if hours > 0
210        then Printf.sprintf " %dh %dm " hours minutes
211        else Printf.sprintf " %dm " minutes
212    
213  let mail_for_completed_file file =  let mail_for_completed_file file =
214    if !!mail <> "" then    if !!mail <> "" then
215      let module M = Mailer in      let module M = Mailer in
216        let info = file_info file in
217      let line1 = "mldonkey has completed the download of:\r\n\r\n" in      let line1 = "mldonkey has completed the download of:\r\n\r\n" in
218    
219      let line2 = Printf.sprintf "\r\nFile: %s\r\nSize: %Ld bytes\r\n"      let line2 = Printf.sprintf "\r\nFile: %s\r\nSize: %Ld bytes\r\nHash: %s\r\nFile was downloaded in%s\r\n"
220        (file_best_name file)        (file_best_name file)
221        (file_size file)        (file_size file)
222          (string_of_uids info.G.file_uids)
223          (let age = (BasicSocket.last_time ()) - info.G.file_age in time_to_string age)
224      in      in
225            
226      let line3 = if (file_comment file) <> "" then      let line3 = if (file_comment file) <> "" then

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26