Explorar o código

Jdownloader last test

CauseFX %!s(int64=7) %!d(string=hai) anos
pai
achega
9df35efbfe
Modificáronse 1 ficheiros con 14 adicións e 2 borrados
  1. 14 2
      js/functions.js

+ 14 - 2
js/functions.js

@@ -4927,8 +4927,20 @@ function buildDownloaderItem(array, source, type='none'){
             }
             $.each(array.content.queueItems, function(i,v) {
                 count = count + 1;
-                v.speed = (v.speed == null) ? '--' : v.speed;
-                v.eta = (v.eta == null) ? '--' : v.eta;
+                if(v.speed == null){
+                    if(v.percentage == '100'){
+                        v.speed = '--';
+                    }else{
+                        v.speed = 'Stopped';
+                    }
+                }
+                if(v.eta == null){
+                    if(v.percentage == '100'){
+                        v.eta = 'Complete';
+                    }else{
+                        v.eta = '--';
+                    }
+                }
                 queue += `
                 <tr>
                     <td class="max-texts">`+v.name+`</td>