Use bad_files to display progress if that is larger

This commit is contained in:
shortcutme 2016-09-04 18:01:48 +02:00
parent 37a3b4678d
commit 5a36a002bf
2 changed files with 4 additions and 3 deletions

View File

@ -396,7 +396,7 @@ class Wrapper
updateProgress: (site_info) ->
if site_info.tasks > 0 and site_info.started_task_num > 0
@loading.setProgress 1-(site_info.tasks / site_info.started_task_num)
@loading.setProgress 1-(Math.max(site_info.tasks, site_info.bad_files) / site_info.started_task_num)
else
@loading.hideProgress()

View File

@ -521,6 +521,7 @@ jQuery.extend( jQuery.easing,
}).call(this);
/* ---- src/Ui/media/Loading.coffee ---- */
@ -1299,7 +1300,7 @@ jQuery.extend( jQuery.easing,
Wrapper.prototype.updateProgress = function(site_info) {
if (site_info.tasks > 0 && site_info.started_task_num > 0) {
return this.loading.setProgress(1 - (site_info.tasks / site_info.started_task_num));
return this.loading.setProgress(1 - (Math.max(site_info.tasks, site_info.bad_files) / site_info.started_task_num));
} else {
return this.loading.hideProgress();
}
@ -1378,4 +1379,4 @@ jQuery.extend( jQuery.easing,
window.wrapper = new Wrapper(ws_url);
}).call(this);
}).call(this);