mirror of https://github.com/Chocobozzz/PeerTube
Don't send view on private video
parent
b7f1747dc7
commit
f5a2dc48eb
|
@ -35,7 +35,6 @@ export class VideoEditComponent implements OnInit {
|
||||||
|
|
||||||
schedulePublicationEnabled = false
|
schedulePublicationEnabled = false
|
||||||
|
|
||||||
error: string = null
|
|
||||||
calendarLocale: any = {}
|
calendarLocale: any = {}
|
||||||
minScheduledDate = new Date()
|
minScheduledDate = new Date()
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { Subscription } from 'rxjs'
|
||||||
import * as videojs from 'video.js'
|
import * as videojs from 'video.js'
|
||||||
import 'videojs-hotkeys'
|
import 'videojs-hotkeys'
|
||||||
import * as WebTorrent from 'webtorrent'
|
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 '../../../assets/player/peertube-videojs-plugin'
|
||||||
import { AuthService, ConfirmService } from '../../core'
|
import { AuthService, ConfirmService } from '../../core'
|
||||||
import { RestExtractor, VideoBlacklistService } from '../../shared'
|
import { RestExtractor, VideoBlacklistService } from '../../shared'
|
||||||
|
@ -368,7 +368,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
inactivityTimeout: 2500,
|
inactivityTimeout: 2500,
|
||||||
videoFiles: this.video.files,
|
videoFiles: this.video.files,
|
||||||
playerElement: this.playerElement,
|
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,
|
videoDuration: this.video.duration,
|
||||||
enableHotkeys: true,
|
enableHotkeys: true,
|
||||||
peertubeLink: false,
|
peertubeLink: false,
|
||||||
|
|
|
@ -502,6 +502,8 @@ class PeerTubePlugin extends Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private addViewToVideo () {
|
private addViewToVideo () {
|
||||||
|
if (!this.videoViewUrl) return Promise.resolve(undefined)
|
||||||
|
|
||||||
return fetch(this.videoViewUrl, { method: 'POST' })
|
return fetch(this.videoViewUrl, { method: 'POST' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue