diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-18 09:42:16 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-18 10:26:18 +0200 |
commit | f5a2dc48eb80ab7842cec1da7269b5d153208689 (patch) | |
tree | b4686c38d89511dc62de8b022a2ff5641a5d26c9 | |
parent | b7f1747dc75171368df6ea2ab298971a33af56ed (diff) | |
download | PeerTube-f5a2dc48eb80ab7842cec1da7269b5d153208689.tar.gz PeerTube-f5a2dc48eb80ab7842cec1da7269b5d153208689.tar.zst PeerTube-f5a2dc48eb80ab7842cec1da7269b5d153208689.zip |
Don't send view on private video
3 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts index 24418fc4f..66eb6611a 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts | |||
@@ -35,7 +35,6 @@ export class VideoEditComponent implements OnInit { | |||
35 | 35 | ||
36 | schedulePublicationEnabled = false | 36 | schedulePublicationEnabled = false |
37 | 37 | ||
38 | error: string = null | ||
39 | calendarLocale: any = {} | 38 | calendarLocale: any = {} |
40 | minScheduledDate = new Date() | 39 | minScheduledDate = new Date() |
41 | 40 | ||
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index 72e96ca93..6f6bd4e5d 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -10,7 +10,7 @@ import { Subscription } from 'rxjs' | |||
10 | import * as videojs from 'video.js' | 10 | import * as videojs from 'video.js' |
11 | import 'videojs-hotkeys' | 11 | import 'videojs-hotkeys' |
12 | import * as WebTorrent from 'webtorrent' | 12 | import * as WebTorrent from 'webtorrent' |
13 | import { UserVideoRateType, VideoRateType, VideoState } from '../../../../../shared' | 13 | import { UserVideoRateType, VideoPrivacy, VideoRateType, VideoState } from '../../../../../shared' |
14 | import '../../../assets/player/peertube-videojs-plugin' | 14 | import '../../../assets/player/peertube-videojs-plugin' |
15 | import { AuthService, ConfirmService } from '../../core' | 15 | import { AuthService, ConfirmService } from '../../core' |
16 | import { RestExtractor, VideoBlacklistService } from '../../shared' | 16 | import { RestExtractor, VideoBlacklistService } from '../../shared' |
@@ -368,7 +368,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
368 | inactivityTimeout: 2500, | 368 | inactivityTimeout: 2500, |
369 | videoFiles: this.video.files, | 369 | videoFiles: this.video.files, |
370 | playerElement: this.playerElement, | 370 | playerElement: this.playerElement, |
371 | videoViewUrl: this.videoService.getVideoViewUrl(this.video.uuid), | 371 | videoViewUrl: this.video.privacy.id !== VideoPrivacy.PRIVATE ? this.videoService.getVideoViewUrl(this.video.uuid) : null, |
372 | videoDuration: this.video.duration, | 372 | videoDuration: this.video.duration, |
373 | enableHotkeys: true, | 373 | enableHotkeys: true, |
374 | peertubeLink: false, | 374 | peertubeLink: false, |
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index fe9fc1a69..b62dcb829 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts | |||
@@ -502,6 +502,8 @@ class PeerTubePlugin extends Plugin { | |||
502 | } | 502 | } |
503 | 503 | ||
504 | private addViewToVideo () { | 504 | private addViewToVideo () { |
505 | if (!this.videoViewUrl) return Promise.resolve(undefined) | ||
506 | |||
505 | return fetch(this.videoViewUrl, { method: 'POST' }) | 507 | return fetch(this.videoViewUrl, { method: 'POST' }) |
506 | } | 508 | } |
507 | 509 | ||