Don't send view on private video
This commit is contained in:
parent
b7f1747dc7
commit
f5a2dc48eb
3 changed files with 4 additions and 3 deletions
|
@ -35,7 +35,6 @@ export class VideoEditComponent implements OnInit {
|
|||
|
||||
schedulePublicationEnabled = false
|
||||
|
||||
error: string = null
|
||||
calendarLocale: any = {}
|
||||
minScheduledDate = new Date()
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { Subscription } from 'rxjs'
|
|||
import * as videojs from 'video.js'
|
||||
import 'videojs-hotkeys'
|
||||
import * as WebTorrent from 'webtorrent'
|
||||
import { UserVideoRateType, VideoRateType, VideoState } from '../../../../../shared'
|
||||
import { UserVideoRateType, VideoPrivacy, VideoRateType, VideoState } from '../../../../../shared'
|
||||
import '../../../assets/player/peertube-videojs-plugin'
|
||||
import { AuthService, ConfirmService } from '../../core'
|
||||
import { RestExtractor, VideoBlacklistService } from '../../shared'
|
||||
|
@ -368,7 +368,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
|||
inactivityTimeout: 2500,
|
||||
videoFiles: this.video.files,
|
||||
playerElement: this.playerElement,
|
||||
videoViewUrl: this.videoService.getVideoViewUrl(this.video.uuid),
|
||||
videoViewUrl: this.video.privacy.id !== VideoPrivacy.PRIVATE ? this.videoService.getVideoViewUrl(this.video.uuid) : null,
|
||||
videoDuration: this.video.duration,
|
||||
enableHotkeys: true,
|
||||
peertubeLink: false,
|
||||
|
|
|
@ -502,6 +502,8 @@ class PeerTubePlugin extends Plugin {
|
|||
}
|
||||
|
||||
private addViewToVideo () {
|
||||
if (!this.videoViewUrl) return Promise.resolve(undefined)
|
||||
|
||||
return fetch(this.videoViewUrl, { method: 'POST' })
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue