On Sun, 21 Mar 2010 11:31:50 +0200
ygrek <[email protected]> wrote:

> Updated the patch to correctly display transmission version.

While we are at it, here are some more, taken from 
http://savannah.nongnu.org/bugs/?24695

-- 
 ygrek
 http://ygrek.org.ua/

diff --git a/src/networks/bittorrent/bTGlobals.ml b/src/networks/bittorrent/bTGlobals.ml
index f87d67b..dc8110c 100644
--- a/src/networks/bittorrent/bTGlobals.ml
+++ b/src/networks/bittorrent/bTGlobals.ml
@@ -467,6 +467,7 @@ let decode_az_style s =
       | "ZT" -> Brand_ziptorrent
       | "bk" -> Brand_bitkitten
       | "MP" -> Brand_moopolice
+      | "UM" -> Brand_utorrent_mac
       | "UT" -> Brand_utorrent
       | "KT" -> Brand_ktorrent
       | "LP" -> Brand_lphant
@@ -484,9 +485,15 @@ let decode_az_style s =
       | "AX" -> Brand_bitpump
       | "DE" -> Brand_deluge
       | "TT" -> Brand_tuotu
+      | "SD" (* Thunder (aka XùnLéi) *)
       | "XL" -> Brand_xunlei
       | "FT" -> Brand_foxtorrent
       | "BF" -> Brand_bitflu
+      | "OS" -> Brand_oneswarm
+      | "LW" -> Brand_limewire
+      | "HL" -> Brand_halite
+      | "MR" -> Brand_miro
+      | "PD" -> Brand_pando
       | _ -> Brand_unknown
     in
     if brand = Brand_unknown then None else
@@ -495,12 +502,15 @@ let decode_az_style s =
           (* 4.56 *)
           | Brand_bitpump
           | Brand_bitcomet -> (String.sub s 4 1) ^ "." ^ (String.sub s 5 2)
-          (* 3.45 *)
+          (* 3.4.5 *)
           | Brand_tuotu
+          | Brand_utorrent_mac
+          | Brand_oneswarm
           | Brand_utorrent -> (String.sub s 3 1) ^ "." ^ (String.sub s 4 1) ^ "." ^ (String.sub s 5 1)
+          (* 3.45 *)
+          | Brand_transmission -> (String.sub s 3 1) ^ "." ^ (String.sub s 4 2)
           (* 34.56 *)
-          | Brand_ctorrent
-          | Brand_transmission -> (strip_leading_zeroes (String.sub s 3 2)) ^ "." ^ (strip_leading_zeroes(String.sub s 5 2))
+          | Brand_ctorrent -> (strip_leading_zeroes (String.sub s 3 2)) ^ "." ^ (strip_leading_zeroes(String.sub s 5 2))
           (* 3.4.5->[R=RC.6|D=Dev|''] *)
           | Brand_ktorrent -> 
               let x = match s.[5] with 
@@ -596,6 +606,7 @@ let decode_simple_style s =
       (0,  "btpd",              Brand_btpd,            (dot_string(String.sub s 5 3)));
       (0,  "XBT",               Brand_xbt,             (dot_string(String.sub s 3 3)));
       (0,  "-FG",               Brand_flashget,        (dot_string(String.sub s 4 3)));
+      (0,  "-SP",               Brand_bitspirit,       (dot_string(String.sub s 3 3)));
     ]
   in
   let len = List.length !simple_list in
diff --git a/src/networks/bittorrent/bTTypes.ml b/src/networks/bittorrent/bTTypes.ml
index aa5af21..2750503 100644
--- a/src/networks/bittorrent/bTTypes.ml
+++ b/src/networks/bittorrent/bTTypes.ml
@@ -92,6 +92,7 @@ type brand =
 | Brand_xbt
 | Brand_ziptorrent
 | Brand_moopolice
+| Brand_utorrent_mac
 | Brand_utorrent
 | Brand_opera
 | Brand_torrenttopia
@@ -124,6 +125,10 @@ type brand =
 | Brand_xunlei
 | Brand_foxtorrent
 | Brand_bitflu
+| Brand_oneswarm
+| Brand_halite
+| Brand_miro
+| Brand_pando
 
 let brand_list = [ 
    ( Brand_unknown          , "unknown"                , "unk" ) ;
@@ -171,6 +176,7 @@ let brand_list = [
    ( Brand_xbt              , "XBT"                    , "xbt" ) ;
    ( Brand_ziptorrent       , "ZipTorrent"             , "zit" ) ;
    ( Brand_moopolice        , "MooPolice"              , "moo" ) ;
+   ( Brand_utorrent_mac     , "uTorrent for Mac"       , "uTm" ) ;
    ( Brand_utorrent         , "uTorrent"               , "uTo" ) ;
    ( Brand_opera            , "Opera"                  , "opr" ) ;
    ( Brand_torrenttopia     , "TorrentTopia"           , "tt" ) ;
@@ -203,6 +209,10 @@ let brand_list = [
    ( Brand_xunlei           , "XunLei"                 , "xun" ) ;
    ( Brand_foxtorrent       , "FoxTorrent"             , "fox" ) ;
    ( Brand_bitflu           , "BitFlu"                 , "flu" ) ;
+   ( Brand_oneswarm         , "OneSwarm"               , "osw" ) ;
+   ( Brand_halite           , "Halite"                 , "hal" ) ;
+   ( Brand_miro             , "Miro"                   , "mir" ) ;
+   ( Brand_pando            , "Pando"                  , "pan" ) ;
   ] 
 
 let brand_count = List.length brand_list

_______________________________________________
Mldonkey-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/mldonkey-users

Reply via email to