Browse Source

Prevent invalid end watch section warnings

pull/5340/merge
Chocobozzz 2 weeks ago
parent
commit
7815dc450e
No known key found for this signature in database GPG Key ID: 583A612D890159BE
6 changed files with 10 additions and 10 deletions
  1. +0
    -2
      client/e2e/src/utils/mock-smtp.ts
  2. +0
    -2
      client/src/app/+login/login.component.ts
  3. +0
    -2
      client/src/app/shared/shared-share-modal/video-share.component.ts
  4. +4
    -2
      client/src/assets/player/shared/peertube/peertube-plugin.ts
  5. +6
    -1
      server/lib/views/shared/video-viewer-stats.ts
  6. +0
    -1
      shared/server-commands/server/servers-command.ts

+ 0
- 2
client/e2e/src/utils/mock-smtp.ts View File

@@ -24,8 +24,6 @@ class MockSMTPServer {

this.maildev.on('new', email => {
this.emails.push(email)

console.log('pushed email', email)
})

this.maildev.listen(err => {


+ 0
- 2
client/src/app/+login/login.component.ts View File

@@ -197,8 +197,6 @@ The link will expire within 1 hour.`
}

private handleError (err: any) {
console.log(err)

if (this.authService.isOTPMissingError(err)) {
this.otpStep = true



+ 0
- 2
client/src/app/shared/shared-share-modal/video-share.component.ts View File

@@ -203,8 +203,6 @@ export class VideoShareComponent {
// ---------------------------------------------------------------------------

async onUpdate () {
console.log('on update')

if (this.playlist) {
this.playlistUrl = await this.getPlaylistUrl()
this.playlistEmbedUrl = await this.getPlaylistEmbedUrl()


+ 4
- 2
client/src/assets/player/shared/peertube/peertube-plugin.ts View File

@@ -180,8 +180,10 @@ class PeerTubePlugin extends Plugin {
})

this.player.on('seeked', () => {
// Don't take into account small seek events
if (Math.abs(this.player.currentTime() - lastCurrentTime) < 3) return
const diff = Math.floor(this.player.currentTime()) - lastCurrentTime

// Don't take into account small forwards
if (diff > 0 && diff < 3) return

lastViewEvent = 'seek'
})


+ 6
- 1
server/lib/views/shared/video-viewer-stats.ts View File

@@ -106,7 +106,12 @@ export class VideoViewerStats {
const lastSection = stats.watchSections[stats.watchSections.length - 1]

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 {
lastSection.end = currentTime
}


+ 0
- 1
shared/server-commands/server/servers-command.ts View File

@@ -44,7 +44,6 @@ export class ServersCommand extends AbstractCommand {

await copy(origin, join('artifacts', destname))
}
console.log(this.server.parallel)

if (this.server.parallel) {
const promise = saveGithubLogsIfNeeded()


Loading…
Cancel
Save