mirror of
https://github.com/nextcloud/server.git
synced 2026-03-01 21:10:36 -05:00
fix: Make smooth bitrate and remaining upload time work when unset
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
0609aeeb0a
commit
c87ce4bafc
1 changed files with 6 additions and 6 deletions
|
|
@ -1264,10 +1264,10 @@ OC.Uploader.prototype = _.extend({
|
|||
}
|
||||
//console.log('#', ' idx: ',bufferIndex, ' Total: ', bufferTotal, ' remainSeconds: ', remainingSeconds, ' during: ', diffUpdate);
|
||||
|
||||
if (smoothRemainingSeconds === null) {
|
||||
smoothRemainingSeconds = bufferTotal / bufferSize;
|
||||
} else{
|
||||
if (smoothRemainingSeconds) {
|
||||
smoothRemainingSeconds = smoothing * (bufferTotal / bufferSize) + ((1-smoothing) * smoothRemainingSeconds);
|
||||
} else {
|
||||
smoothRemainingSeconds = bufferTotal / bufferSize;
|
||||
}
|
||||
|
||||
if (bufferIndex % 4 === 0) {
|
||||
|
|
@ -1281,10 +1281,10 @@ OC.Uploader.prototype = _.extend({
|
|||
}
|
||||
|
||||
// smooth bitrate
|
||||
if (smoothBitrate === null) {
|
||||
smoothBitrate = data.bitrate;
|
||||
} else{
|
||||
if (smoothBitrate) {
|
||||
smoothBitrate = smoothing * data.bitrate + ((1-smoothing) * smoothBitrate);
|
||||
} else {
|
||||
smoothBitrate = data.bitrate;
|
||||
}
|
||||
|
||||
self._setProgressBarText(h, h, t('files', '{loadedSize} of {totalSize} ({bitrate})' , {
|
||||
|
|
|
|||
Loading…
Reference in a new issue