mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
Date: Wed, 17 Jan 2007 18:51:42 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       07/01/17 18:51:41

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonWeb.ml 
        src/daemon/driver: driverCommands.ml 

Log message:
        patch #5678

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1152&r2=1.1153
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonWeb.ml?cvsroot=mldonkey&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverCommands.ml?cvsroot=mldonkey&r1=1.211&r2=1.212

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1152
retrieving revision 1.1153
diff -u -b -r1.1152 -r1.1153
--- distrib/ChangeLog   15 Jan 2007 21:32:56 -0000      1.1152
+++ distrib/ChangeLog   17 Jan 2007 18:51:41 -0000      1.1153
@@ -14,6 +14,9 @@
 ChangeLog
 =========
 
+2007/01/17
+5678: New options for command force_web_infos: kind/URL (thx to Schlumpf)
+
 2007/01/15
 5691: EDK: Recognize compatibleclient 60: IMPmule (imp-project.net)
 5689: EDK: Log downloading file name when client disconnects

Index: src/daemon/common/commonWeb.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonWeb.ml,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- src/daemon/common/commonWeb.ml      26 Nov 2006 13:54:09 -0000      1.37
+++ src/daemon/common/commonWeb.ml      17 Jan 2007 18:51:41 -0000      1.38
@@ -150,7 +150,7 @@
     with e -> failwith (Printf.sprintf "Unknown kind [%s]" kind)
   in
   try
-    lprintf_nl (_b "saving %s (%s)") kind url;
+    lprintf_nl (_b "request %s (%s)") kind url;
     mldonkey_wget url f
   with e ->
     if can_fail then

Index: src/daemon/driver/driverCommands.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -b -r1.211 -r1.212
--- src/daemon/driver/driverCommands.ml 15 Jan 2007 18:26:27 -0000      1.211
+++ src/daemon/driver/driverCommands.ml 17 Jan 2007 18:51:41 -0000      1.212
@@ -352,10 +352,23 @@
             "URL does not exists in web_infos"
     ), "<url> :\t\t\tremove URL from web_infos";
 
-    "force_web_infos", Arg_none (fun o ->
-       CommonWeb.load_web_infos false true;
-        "downloading all web_infos URLs"
-    ), ":\t\t\tforce downloading all web_infos URLs";
+    "force_web_infos", Arg_multiple (fun args o ->
+        (match args with
+        | [] -> CommonWeb.load_web_infos false true;
+                "requesting all web_infos files"
+        | args -> let list = ref [] in
+                  List.iter (fun arg ->
+                    List.iter (fun (kind, _, url) ->
+                      if kind = arg || url = arg then begin
+                        CommonWeb.load_url false kind url;
+                        list := arg :: !list
+                      end
+                  ) !!web_infos) args;
+                  if !list = [] then
+                    Printf.sprintf "found no web_infos entries for %s" 
(String.concat " " args)
+                  else
+                    Printf.sprintf "requesting web_infos %s" (String.concat " 
" !list))
+    ), "[<list of kind|URL>] :\tre-download web_infos, leave empty to 
re-download all";
 
     "recover_temp", Arg_none (fun o ->
         networks_iter (fun r ->
@@ -1926,6 +1939,8 @@
 \\<tr\\>\\<td\\>
 \\<table cellspacing=0 cellpadding=0  width=100%%\\>\\<tr\\>
 \\<td class=downloaded width=100%%\\>\\</td\\>
+\\<td nowrap title=\\\"force downloading all web_infos files\\\" 
class=\\\"fbig\\\"\\>
+\\<a onclick=\\\"javascript: 
{parent.fstatus.location.href='submit?q=force_web_infos';}\\\"\\>Re-download 
all\\</a\\>
 \\<td nowrap class=\\\"fbig pr\\\"\\>\\<a onclick=\\\"javascript: {
                    var getdir = prompt('Input: <kind> <URL> 
[<period>]','server.met URL')
                    parent.fstatus.location.href='submit?q=urladd+' + 
encodeURIComponent(getdir);
@@ -1943,16 +1958,14 @@
 
              html_mods_table_header buf "web_infoTable" "vo" [
                ( "0", "srh ac", "Click to remove URL", "Remove" ) ;
+               ( "0", "srh", "Download now", "DL" ) ;
                ( "0", "srh", "Option type", "Type" ) ;
                ( "0", "srh", "Option delay", "Delay" ) ;
                ( "0", "srh", "Option value", "Value" ) ] ;
 
-              let counter = ref 0 in
-
+              html_mods_cntr_init ();
               List.iter (fun (kind, period, url) ->
-                incr counter;
-                Printf.bprintf buf "\\<tr class=\\\"%s\\\"\\>"
-                (if !counter mod 2 == 0 then "dl-1" else "dl-2");
+                Printf.bprintf buf "\\<tr class=\\\"dl-%d\\\"\\>" 
(html_mods_cntr ());
                Printf.bprintf buf "
         \\<td title=\\\"Click to remove URL\\\"
         onMouseOver=\\\"mOvr(this);\\\"
@@ -1962,6 +1975,13 @@
         setTimeout(\\\"window.location.reload()\\\",1000);}'
         class=\\\"srb\\\"\\>Remove\\</td\\>" (Url.encode url);
           Printf.bprintf buf "
+        \\<td title=\\\"Download now\\\"
+        onMouseOver=\\\"mOvr(this);\\\"
+        onMouseOut=\\\"mOut(this);\\\"
+        onClick=\\\'javascript:{
+       
parent.fstatus.location.href=\\\"submit?q=force_web_infos+\\\\\\\"%s\\\\\\\"\\\";}'
+        class=\\\"srb\\\"\\>DL\\</td\\>" (Url.encode url);
+          Printf.bprintf buf "
               \\<td title=\\\"%s\\\" class=\\\"sr\\\"\\>%s\\</td\\>
              \\<td class=\\\"sr\\\"\\>%d\\</td\\>"  url kind period;
           Printf.bprintf buf "
@@ -1975,11 +1995,9 @@
              ( "0", "srh", "Web kind", "Kind" );
              ( "0", "srh", "Description", "Type" ) ];
 
-            let counter = ref 0 in
+            html_mods_cntr_init ();
             List.iter (fun (kind, data) ->
-                incr counter;
-                Printf.bprintf buf "\\<tr class=\\\"%s\\\"\\>"
-                (if !counter mod 2 == 0 then "dl-1" else "dl-2");
+                Printf.bprintf buf "\\<tr class=\\\"dl-%d\\\"\\>" 
(html_mods_cntr ());
                Printf.bprintf buf "
               \\<td class=\\\"sr\\\"\\>%s\\</td\\>
              \\<td class=\\\"sr\\\"\\>%s\\</td\\>" kind data.description




reply via email to

[Prev in Thread] Current Thread [Next in Thread]