Use bad_files to display progress if that is larger
This commit is contained in:
parent
37a3b4678d
commit
5a36a002bf
2 changed files with 4 additions and 3 deletions
|
@ -396,7 +396,7 @@ class Wrapper
|
||||||
|
|
||||||
updateProgress: (site_info) ->
|
updateProgress: (site_info) ->
|
||||||
if site_info.tasks > 0 and site_info.started_task_num > 0
|
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
|
else
|
||||||
@loading.hideProgress()
|
@loading.hideProgress()
|
||||||
|
|
||||||
|
|
|
@ -521,6 +521,7 @@ jQuery.extend( jQuery.easing,
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ---- src/Ui/media/Loading.coffee ---- */
|
/* ---- src/Ui/media/Loading.coffee ---- */
|
||||||
|
|
||||||
|
|
||||||
|
@ -1299,7 +1300,7 @@ jQuery.extend( jQuery.easing,
|
||||||
|
|
||||||
Wrapper.prototype.updateProgress = function(site_info) {
|
Wrapper.prototype.updateProgress = function(site_info) {
|
||||||
if (site_info.tasks > 0 && site_info.started_task_num > 0) {
|
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 {
|
} else {
|
||||||
return this.loading.hideProgress();
|
return this.loading.hideProgress();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue