[www-doc] [Git][VideoLAN.org/websites][master] Update mirrorbits section

Jean-Baptiste Kempf gitlab at videolan.org
Wed Jan 9 19:13:28 CET 2019


Jean-Baptiste Kempf pushed to branch master at VideoLAN organization / websites


Commits:
fda57d7a by Jean-Baptiste Kempf at 2019-01-09T18:13:24Z
Update mirrorbits section

- - - - -


1 changed file:

- www.videolan.org/vlc/stats/downloads.php


Changes:

=====================================
www.videolan.org/vlc/stats/downloads.php
=====================================
@@ -446,40 +446,41 @@
     {
         echo "<tr><td class=\"category\" style=\"text-align: left;\"><strong>$key</strong></td>\n";
 
-       // <Mirrorbits>
-       if (array_key_exists($key, $table_mirrorbits))
-       {
-               $platforms = array("Windows", "Macintosh", "Source");
-               foreach($platforms as $platform)
-               {
-                       if (array_key_exists($platform, $table_mirrorbits[$key]))
-                       {
-                               $value = 0;
-                               if (is_array($table_mirrorbits[$key][$platform]))
-                               {
-                                       foreach($table_mirrorbits[$key][$platform] as $url)
-                                       {
-                                               $final = str_replace("#version#", $key, $url);
-                                               $value += mirrorbits_fetch($final);
-                                       }
-                               }
-                               else
-                               {
-                                       $final = str_replace("#version#", $key, $table_mirrorbits[$key][$platform]);
-                                       $value += mirrorbits_fetch($final);
-                               }
-
-                               if ($platform == "Windows" || $platform == "Macintosh")
-                               {
-                                       $t[$platform] += $value;
-                               }
-
-                               // Historically "source" is computed from the total - windows - mac
-                               $t["Total"] += $value;
-                       }
-               }
-       }
-       // </Mirrorbits>
+        // <Mirrorbits>
+        if (array_key_exists($key, $table_mirrorbits))
+        {
+            $ftp_multiplier = 1.021; // Estimation of downloads on our ftp/http directly, based on the stats of the last months (early 2019)
+            $platforms = array("Windows", "Macintosh", "Source");
+            foreach($platforms as $platform)
+            {
+                if (array_key_exists($platform, $table_mirrorbits[$key]))
+                {
+                    $value = 0;
+                    if (is_array($table_mirrorbits[$key][$platform]))
+                    {
+                        foreach($table_mirrorbits[$key][$platform] as $url)
+                        {
+                            $final = str_replace("#version#", $key, $url);
+                            $value += mirrorbits_fetch($final) * $ftp_multiplier;
+                        }
+                    }
+                    else
+                    {
+                        $final = str_replace("#version#", $key, $table_mirrorbits[$key][$platform]);
+                        $value += mirrorbits_fetch($final) * $ftp_multiplier;
+                    }
+
+                    if ($platform == "Windows" || $platform == "Macintosh")
+                    {
+                        $t[$platform] += $value;
+                    }
+
+                    // Historically "source" is computed from the total - windows - mac
+                    $t["Total"] += $value;
+                }
+            }
+        }
+        // </Mirrorbits>
 
         $wintotal += $t["Windows"];
         $mactotal += $t["Macintosh"];
@@ -492,7 +493,7 @@
         echo "</tr>\n";
     }
 
-    // Android Installs by users (downloads are higher)
+    // Android Installs by users (actual downloads are higher)
     $android_old = 77956940;
     $android_new = 163917190;
     echo "



View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/commit/fda57d7a779d811e99af3cca6195e972516dda88

-- 
View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/commit/fda57d7a779d811e99af3cca6195e972516dda88
You're receiving this email because of your account on code.videolan.org.


More information about the www-doc mailing list