Prevent invalid end watch section warnings
This commit is contained in:
parent
bc3bd960e3
commit
7815dc450e
|
@ -24,8 +24,6 @@ class MockSMTPServer {
|
||||||
|
|
||||||
this.maildev.on('new', email => {
|
this.maildev.on('new', email => {
|
||||||
this.emails.push(email)
|
this.emails.push(email)
|
||||||
|
|
||||||
console.log('pushed email', email)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
this.maildev.listen(err => {
|
this.maildev.listen(err => {
|
||||||
|
|
|
@ -197,8 +197,6 @@ The link will expire within 1 hour.`
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleError (err: any) {
|
private handleError (err: any) {
|
||||||
console.log(err)
|
|
||||||
|
|
||||||
if (this.authService.isOTPMissingError(err)) {
|
if (this.authService.isOTPMissingError(err)) {
|
||||||
this.otpStep = true
|
this.otpStep = true
|
||||||
|
|
||||||
|
|
|
@ -203,8 +203,6 @@ export class VideoShareComponent {
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
async onUpdate () {
|
async onUpdate () {
|
||||||
console.log('on update')
|
|
||||||
|
|
||||||
if (this.playlist) {
|
if (this.playlist) {
|
||||||
this.playlistUrl = await this.getPlaylistUrl()
|
this.playlistUrl = await this.getPlaylistUrl()
|
||||||
this.playlistEmbedUrl = await this.getPlaylistEmbedUrl()
|
this.playlistEmbedUrl = await this.getPlaylistEmbedUrl()
|
||||||
|
|
|
@ -180,8 +180,10 @@ class PeerTubePlugin extends Plugin {
|
||||||
})
|
})
|
||||||
|
|
||||||
this.player.on('seeked', () => {
|
this.player.on('seeked', () => {
|
||||||
// Don't take into account small seek events
|
const diff = Math.floor(this.player.currentTime()) - lastCurrentTime
|
||||||
if (Math.abs(this.player.currentTime() - lastCurrentTime) < 3) return
|
|
||||||
|
// Don't take into account small forwards
|
||||||
|
if (diff > 0 && diff < 3) return
|
||||||
|
|
||||||
lastViewEvent = 'seek'
|
lastViewEvent = 'seek'
|
||||||
})
|
})
|
||||||
|
|
|
@ -106,7 +106,12 @@ export class VideoViewerStats {
|
||||||
const lastSection = stats.watchSections[stats.watchSections.length - 1]
|
const lastSection = stats.watchSections[stats.watchSections.length - 1]
|
||||||
|
|
||||||
if (lastSection.start > currentTime) {
|
if (lastSection.start > currentTime) {
|
||||||
logger.warn('Invalid end watch section %d. Last start record was at %d.', currentTime, lastSection.start)
|
logger.debug('Invalid end watch section %d. Last start record was at %d. Starting a new section.', currentTime, lastSection.start)
|
||||||
|
|
||||||
|
stats.watchSections.push({
|
||||||
|
start: currentTime,
|
||||||
|
end: currentTime
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
lastSection.end = currentTime
|
lastSection.end = currentTime
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ export class ServersCommand extends AbstractCommand {
|
||||||
|
|
||||||
await copy(origin, join('artifacts', destname))
|
await copy(origin, join('artifacts', destname))
|
||||||
}
|
}
|
||||||
console.log(this.server.parallel)
|
|
||||||
|
|
||||||
if (this.server.parallel) {
|
if (this.server.parallel) {
|
||||||
const promise = saveGithubLogsIfNeeded()
|
const promise = saveGithubLogsIfNeeded()
|
||||||
|
|
Loading…
Reference in New Issue