Prevent invalid end watch section warnings

This commit is contained in:
Chocobozzz 2023-05-10 14:23:59 +02:00
parent bc3bd960e3
commit 7815dc450e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
6 changed files with 10 additions and 10 deletions

View File

@ -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 => {

View File

@ -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

View File

@ -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()

View File

@ -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'
}) })

View File

@ -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
} }

View File

@ -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()