aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+videos')
-rw-r--r--client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts2
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts8
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit-utils.ts2
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts10
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/drag-drop.directive.ts8
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts2
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.html2
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts4
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts2
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-send.ts2
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html2
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts5
-rw-r--r--client/src/app/+videos/+video-edit/video-update.component.ts5
-rw-r--r--client/src/app/+videos/+video-edit/video-update.resolver.ts6
-rw-r--r--client/src/app/+videos/+video-watch/player-styles.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts6
-rw-r--r--client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html2
-rw-r--r--client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts8
-rw-r--r--client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/metadata/video-description.component.html2
-rw-r--r--client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts10
-rw-r--r--client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html2
-rw-r--r--client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts8
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts39
-rw-r--r--client/src/app/+videos/video-list/overview/overview.service.ts2
-rw-r--r--client/src/app/+videos/video-list/trending/video-trending-header.component.ts2
-rw-r--r--client/src/app/+videos/video-list/trending/video-trending.component.ts6
-rw-r--r--client/src/app/+videos/video-list/video-local.component.ts2
30 files changed, 82 insertions, 75 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts b/client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts
index 34848b036..4b201ac74 100644
--- a/client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts
+++ b/client/src/app/+videos/+video-edit/shared/i18n-primeng-calendar.service.ts
@@ -73,7 +73,7 @@ export class I18nPrimengCalendarService {
73 } 73 }
74 74
75 getTimezone () { 75 getTimezone () {
76 const gmt = new Date().toString().match(/([A-Z]+[\+-][0-9]+)/)[1] 76 const gmt = new Date().toString().match(/([A-Z]+[+-][0-9]+)/)[1]
77 const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone 77 const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone
78 78
79 return `${timezone} - ${gmt}` 79 return `${timezone} - ${gmt}`
diff --git a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
index 875911b91..98d66ff00 100644
--- a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
@@ -66,18 +66,18 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni
66 isReplacingExistingCaption () { 66 isReplacingExistingCaption () {
67 if (this.closingModal === true) return false 67 if (this.closingModal === true) return false
68 68
69 const languageId = this.form.value[ 'language' ] 69 const languageId = this.form.value['language']
70 70
71 return languageId && this.existingCaptions.indexOf(languageId) !== -1 71 return languageId && this.existingCaptions.includes(languageId)
72 } 72 }
73 73
74 async addCaption () { 74 async addCaption () {
75 const languageId = this.form.value[ 'language' ] 75 const languageId = this.form.value['language']
76 const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId) 76 const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId)
77 77
78 this.captionAdded.emit({ 78 this.captionAdded.emit({
79 language: languageObject, 79 language: languageObject,
80 captionfile: this.form.value[ 'captionfile' ] 80 captionfile: this.form.value['captionfile']
81 }) 81 })
82 82
83 this.hide() 83 this.hide()
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts b/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts
index 3a7dbed36..db1ef8d73 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts
@@ -24,7 +24,7 @@ function hydrateFormFromVideo (formGroup: FormGroup, video: VideoEdit, thumbnail
24 .then(response => response.blob()) 24 .then(response => response.blob())
25 .then(data => { 25 .then(data => {
26 formGroup.patchValue({ 26 formGroup.patchValue({
27 [ obj.name ]: data 27 [obj.name]: data
28 }) 28 })
29 }) 29 })
30 } 30 }
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 90a0e8f52..366c93a79 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
@@ -233,7 +233,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
233 233
234 async deleteCaption (caption: VideoCaptionEdit) { 234 async deleteCaption (caption: VideoCaptionEdit) {
235 // Caption recovers his former state 235 // Caption recovers his former state
236 if (caption.action && this.initialVideoCaptions.indexOf(caption.language.id) !== -1) { 236 if (caption.action && this.initialVideoCaptions.includes(caption.language.id)) {
237 caption.action = undefined 237 caption.action = undefined
238 return 238 return
239 } 239 }
@@ -297,7 +297,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
297 297
298 private trackPrivacyChange () { 298 private trackPrivacyChange () {
299 // We will update the schedule input and the wait transcoding checkbox validators 299 // We will update the schedule input and the wait transcoding checkbox validators
300 this.form.controls[ 'privacy' ] 300 this.form.controls['privacy']
301 .valueChanges 301 .valueChanges
302 .pipe(map(res => parseInt(res.toString(), 10))) 302 .pipe(map(res => parseInt(res.toString(), 10)))
303 .subscribe( 303 .subscribe(
@@ -336,12 +336,12 @@ export class VideoEditComponent implements OnInit, OnDestroy {
336 336
337 private trackChannelChange () { 337 private trackChannelChange () {
338 // We will update the "support" field depending on the channel 338 // We will update the "support" field depending on the channel
339 this.form.controls[ 'channelId' ] 339 this.form.controls['channelId']
340 .valueChanges 340 .valueChanges
341 .pipe(map(res => parseInt(res.toString(), 10))) 341 .pipe(map(res => parseInt(res.toString(), 10)))
342 .subscribe( 342 .subscribe(
343 newChannelId => { 343 newChannelId => {
344 const oldChannelId = parseInt(this.form.value[ 'channelId' ], 10) 344 const oldChannelId = parseInt(this.form.value['channelId'], 10)
345 345
346 // Not initialized yet 346 // Not initialized yet
347 if (isNaN(newChannelId)) return 347 if (isNaN(newChannelId)) return
@@ -350,7 +350,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
350 350
351 // Wait support field update 351 // Wait support field update
352 setTimeout(() => { 352 setTimeout(() => {
353 const currentSupport = this.form.value[ 'support' ] 353 const currentSupport = this.form.value['support']
354 354
355 // First time we set the channel? 355 // First time we set the channel?
356 if (isNaN(oldChannelId)) { 356 if (isNaN(oldChannelId)) {
diff --git a/client/src/app/+videos/+video-edit/video-add-components/drag-drop.directive.ts b/client/src/app/+videos/+video-edit/video-add-components/drag-drop.directive.ts
index 7b1a38c62..7c35e6b84 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/drag-drop.directive.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/drag-drop.directive.ts
@@ -1,26 +1,26 @@
1import { Directive, Output, EventEmitter, HostBinding, HostListener } from '@angular/core' 1import { Directive, Output, EventEmitter, HostBinding, HostListener } from '@angular/core'
2 2
3@Directive({ 3@Directive({
4 selector: '[dragDrop]' 4 selector: '[myDragDrop]'
5}) 5})
6export class DragDropDirective { 6export class DragDropDirective {
7 @Output() fileDropped = new EventEmitter<FileList>() 7 @Output() fileDropped = new EventEmitter<FileList>()
8 8
9 @HostBinding('class.dragover') dragover = false 9 @HostBinding('class.dragover') dragover = false
10 10
11 @HostListener('dragover', ['$event']) onDragOver (e: Event) { 11 @HostListener('dragover', [ '$event' ]) onDragOver (e: Event) {
12 e.preventDefault() 12 e.preventDefault()
13 e.stopPropagation() 13 e.stopPropagation()
14 this.dragover = true 14 this.dragover = true
15 } 15 }
16 16
17 @HostListener('dragleave', ['$event']) public onDragLeave (e: Event) { 17 @HostListener('dragleave', [ '$event' ]) public onDragLeave (e: Event) {
18 e.preventDefault() 18 e.preventDefault()
19 e.stopPropagation() 19 e.stopPropagation()
20 this.dragover = false 20 this.dragover = false
21 } 21 }
22 22
23 @HostListener('drop', ['$event']) public ondrop (e: DragEvent) { 23 @HostListener('drop', [ '$event' ]) public ondrop (e: DragEvent) {
24 e.preventDefault() 24 e.preventDefault()
25 e.stopPropagation() 25 e.stopPropagation()
26 this.dragover = false 26 this.dragover = false
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
index 30c79594d..1b9447e03 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
@@ -41,7 +41,7 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, AfterView
41 private liveVideoService: LiveVideoService, 41 private liveVideoService: LiveVideoService,
42 private router: Router, 42 private router: Router,
43 private hooks: HooksService 43 private hooks: HooksService
44 ) { 44 ) {
45 super() 45 super()
46 } 46 }
47 47
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.html b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.html
index 20a7538db..0f1a94c84 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.html
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.html
@@ -1,4 +1,4 @@
1<div *ngIf="!hasImportedVideo" class="upload-video-container" dragDrop (fileDropped)="setTorrentFile($event)"> 1<div *ngIf="!hasImportedVideo" class="upload-video-container" myDragDrop (fileDropped)="setTorrentFile($event)">
2 <div class="first-step-block"> 2 <div class="first-step-block">
3 <my-global-icon class="upload-icon" iconName="upload" aria-hidden="true"></my-global-icon> 3 <my-global-icon class="upload-icon" iconName="upload" aria-hidden="true"></my-global-icon>
4 4
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts
index fef1f5d65..87e47683f 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts
@@ -5,7 +5,7 @@ import { scrollToTop } from '@app/helpers'
5import { FormValidatorService } from '@app/shared/shared-forms' 5import { FormValidatorService } from '@app/shared/shared-forms'
6import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' 6import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main'
7import { LoadingBarService } from '@ngx-loading-bar/core' 7import { LoadingBarService } from '@ngx-loading-bar/core'
8import { PeerTubeProblemDocument, ServerErrorCode, VideoPrivacy, VideoUpdate } from '@shared/models' 8import { PeerTubeProblemDocument, ServerErrorCode, VideoUpdate } from '@shared/models'
9import { hydrateFormFromVideo } from '../shared/video-edit-utils' 9import { hydrateFormFromVideo } from '../shared/video-edit-utils'
10import { VideoSend } from './video-send' 10import { VideoSend } from './video-send'
11 11
@@ -43,7 +43,7 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Af
43 private router: Router, 43 private router: Router,
44 private videoImportService: VideoImportService, 44 private videoImportService: VideoImportService,
45 private hooks: HooksService 45 private hooks: HooksService
46 ) { 46 ) {
47 super() 47 super()
48 } 48 }
49 49
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts
index e1893b28f..3487c1adf 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts
@@ -59,7 +59,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, AfterV
59 } 59 }
60 60
61 isTargetUrlValid () { 61 isTargetUrlValid () {
62 return this.targetUrl && this.targetUrl.match(/https?:\/\//) 62 return this.targetUrl?.match(/https?:\/\//)
63 } 63 }
64 64
65 importVideo () { 65 importVideo () {
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
index ce8de049d..efa8c85a3 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
@@ -9,7 +9,7 @@ import { LoadingBarService } from '@ngx-loading-bar/core'
9import { HTMLServerConfig, VideoConstant, VideoPrivacy } from '@shared/models' 9import { HTMLServerConfig, VideoConstant, VideoPrivacy } from '@shared/models'
10 10
11@Directive() 11@Directive()
12// tslint:disable-next-line: directive-class-suffix 12// eslint-disable-next-line @angular-eslint/directive-class-suffix
13export abstract class VideoSend extends FormReactive implements OnInit { 13export abstract class VideoSend extends FormReactive implements OnInit {
14 userVideoChannels: SelectChannelItem[] = [] 14 userVideoChannels: SelectChannelItem[] = []
15 videoPrivacies: VideoConstant<VideoPrivacy>[] = [] 15 videoPrivacies: VideoConstant<VideoPrivacy>[] = []
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html
index 14cd06fcf..db494a02f 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html
@@ -1,4 +1,4 @@
1<div *ngIf="!isUploadingVideo" class="upload-video-container" dragDrop (fileDropped)="onFileDropped($event)"> 1<div *ngIf="!isUploadingVideo" class="upload-video-container" myDragDrop (fileDropped)="onFileDropped($event)">
2 <div class="first-step-block"> 2 <div class="first-step-block">
3 <my-global-icon class="upload-icon" iconName="upload" aria-hidden="true"></my-global-icon> 3 <my-global-icon class="upload-icon" iconName="upload" aria-hidden="true"></my-global-icon>
4 4
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
index b8cb4fa1e..dee2bb57a 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
@@ -128,7 +128,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
128 128
129 onUploadVideoOngoing (state: UploadState) { 129 onUploadVideoOngoing (state: UploadState) {
130 switch (state.status) { 130 switch (state.status) {
131 case 'error': 131 case 'error': {
132 const error = state.response?.error || 'Unknow error' 132 const error = state.response?.error || 'Unknow error'
133 133
134 this.handleUploadError({ 134 this.handleUploadError({
@@ -143,6 +143,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
143 url: state.url 143 url: state.url
144 }) 144 })
145 break 145 break
146 }
146 147
147 case 'cancelled': 148 case 'cancelled':
148 this.isUploadingVideo = false 149 this.isUploadingVideo = false
@@ -323,6 +324,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
323 const videoQuotaUsedBytes = bytePipes.transform(this.userVideoQuotaUsed, 0) 324 const videoQuotaUsedBytes = bytePipes.transform(this.userVideoQuotaUsed, 0)
324 const videoQuotaBytes = bytePipes.transform(videoQuota, 0) 325 const videoQuotaBytes = bytePipes.transform(videoQuota, 0)
325 326
327 // eslint-disable-next-line max-len
326 const msg = $localize`Your video quota is exceeded with this video (video size: ${videoSizeBytes}, used: ${videoQuotaUsedBytes}, quota: ${videoQuotaBytes})` 328 const msg = $localize`Your video quota is exceeded with this video (video size: ${videoSizeBytes}, used: ${videoQuotaUsedBytes}, quota: ${videoQuotaBytes})`
327 this.notifier.error(msg) 329 this.notifier.error(msg)
328 330
@@ -341,6 +343,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
341 const videoSizeBytes = bytePipes.transform(videofile.size, 0) 343 const videoSizeBytes = bytePipes.transform(videofile.size, 0)
342 const quotaUsedDailyBytes = bytePipes.transform(this.userVideoQuotaUsedDaily, 0) 344 const quotaUsedDailyBytes = bytePipes.transform(this.userVideoQuotaUsedDaily, 0)
343 const quotaDailyBytes = bytePipes.transform(videoQuotaDaily, 0) 345 const quotaDailyBytes = bytePipes.transform(videoQuotaDaily, 0)
346 // eslint-disable-next-line max-len
344 const msg = $localize`Your daily video quota is exceeded with this video (video size: ${videoSizeBytes}, used: ${quotaUsedDailyBytes}, quota: ${quotaDailyBytes})` 347 const msg = $localize`Your daily video quota is exceeded with this video (video size: ${videoSizeBytes}, used: ${quotaUsedDailyBytes}, quota: ${quotaDailyBytes})`
345 this.notifier.error(msg) 348 this.notifier.error(msg)
346 349
diff --git a/client/src/app/+videos/+video-edit/video-update.component.ts b/client/src/app/+videos/+video-edit/video-update.component.ts
index 95336dc75..9bef60133 100644
--- a/client/src/app/+videos/+video-edit/video-update.component.ts
+++ b/client/src/app/+videos/+video-edit/video-update.component.ts
@@ -38,7 +38,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
38 private loadingBar: LoadingBarService, 38 private loadingBar: LoadingBarService,
39 private videoCaptionService: VideoCaptionService, 39 private videoCaptionService: VideoCaptionService,
40 private liveVideoService: LiveVideoService 40 private liveVideoService: LiveVideoService
41 ) { 41 ) {
42 super() 42 super()
43 } 43 }
44 44
@@ -119,8 +119,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
119 } 119 }
120 120
121 update () { 121 update () {
122 if (this.checkForm() === false 122 if (this.checkForm() === false || this.isUpdatingVideo === true) {
123 || this.isUpdatingVideo === true) {
124 return 123 return
125 } 124 }
126 125
diff --git a/client/src/app/+videos/+video-edit/video-update.resolver.ts b/client/src/app/+videos/+video-edit/video-update.resolver.ts
index 9172b78a8..91e76b7fe 100644
--- a/client/src/app/+videos/+video-edit/video-update.resolver.ts
+++ b/client/src/app/+videos/+video-edit/video-update.resolver.ts
@@ -18,7 +18,7 @@ export class VideoUpdateResolver implements Resolve<any> {
18 } 18 }
19 19
20 resolve (route: ActivatedRouteSnapshot) { 20 resolve (route: ActivatedRouteSnapshot) {
21 const uuid: string = route.params[ 'uuid' ] 21 const uuid: string = route.params['uuid']
22 22
23 return this.videoService.getVideo({ videoId: uuid }) 23 return this.videoService.getVideo({ videoId: uuid })
24 .pipe( 24 .pipe(
@@ -42,8 +42,8 @@ export class VideoUpdateResolver implements Resolve<any> {
42 ), 42 ),
43 43
44 video.isLive 44 video.isLive
45 ? this.liveVideoService.getVideoLive(video.id) 45 ? this.liveVideoService.getVideoLive(video.id)
46 : of(undefined) 46 : of(undefined)
47 ] 47 ]
48 } 48 }
49} 49}
diff --git a/client/src/app/+videos/+video-watch/player-styles.component.ts b/client/src/app/+videos/+video-watch/player-styles.component.ts
index 9b1672a8c..448a0ee96 100644
--- a/client/src/app/+videos/+video-watch/player-styles.component.ts
+++ b/client/src/app/+videos/+video-watch/player-styles.component.ts
@@ -8,7 +8,7 @@ import { Component, ViewEncapsulation } from '@angular/core'
8 selector: 'my-player-styles', 8 selector: 'my-player-styles',
9 template: '', 9 template: '',
10 styleUrls: [ './player-styles.component.scss' ], 10 styleUrls: [ './player-styles.component.scss' ],
11 // tslint:disable:use-component-view-encapsulation 11 /* eslint-disable @angular-eslint/use-component-view-encapsulation */
12 encapsulation: ViewEncapsulation.None 12 encapsulation: ViewEncapsulation.None
13}) 13})
14export class PlayerStylesComponent { 14export class PlayerStylesComponent {
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts
index ac65f7260..71fb127f6 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts
@@ -25,7 +25,7 @@ import { VideoCommentCreate } from '@shared/models'
25@Component({ 25@Component({
26 selector: 'my-video-comment-add', 26 selector: 'my-video-comment-add',
27 templateUrl: './video-comment-add.component.html', 27 templateUrl: './video-comment-add.component.html',
28 styleUrls: ['./video-comment-add.component.scss'] 28 styleUrls: [ './video-comment-add.component.scss' ]
29}) 29})
30export class VideoCommentAddComponent extends FormReactive implements OnChanges, OnInit { 30export class VideoCommentAddComponent extends FormReactive implements OnChanges, OnInit {
31 @Input() user: User 31 @Input() user: User
@@ -64,7 +64,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges,
64 for (const emojiMarkupName in emojiMarkupObjectList) { 64 for (const emojiMarkupName in emojiMarkupObjectList) {
65 if (emojiMarkupName) { 65 if (emojiMarkupName) {
66 const emoji = emojiMarkupObjectList[emojiMarkupName] 66 const emoji = emojiMarkupObjectList[emojiMarkupName]
67 emojiMarkupArrayList.push([emoji, emojiMarkupName]) 67 emojiMarkupArrayList.push([ emoji, emojiMarkupName ])
68 } 68 }
69 } 69 }
70 70
@@ -91,7 +91,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges,
91 // Not initialized yet 91 // Not initialized yet
92 if (!this.form) return 92 if (!this.form) return
93 93
94 if (changes.textValue && changes.textValue.currentValue && changes.textValue.currentValue !== changes.textValue.previousValue) { 94 if (changes.textValue?.currentValue && changes.textValue.currentValue !== changes.textValue.previousValue) {
95 this.patchTextValue(changes.textValue.currentValue, true) 95 this.patchTextValue(changes.textValue.currentValue, true)
96 } 96 }
97 } 97 }
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html
index d8b944b35..d0e9bcd29 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html
@@ -29,7 +29,7 @@
29 class="comment-html" 29 class="comment-html"
30 [innerHTML]="sanitizedCommentHTML" 30 [innerHTML]="sanitizedCommentHTML"
31 (timestampClicked)="handleTimestampClicked($event)" 31 (timestampClicked)="handleTimestampClicked($event)"
32 timestampRouteTransformer 32 myTimestampRouteTransformer
33 ></div> 33 ></div>
34 34
35 <div class="comment-actions"> 35 <div class="comment-actions">
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
index f858f4750..5bbcffe82 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
@@ -10,7 +10,7 @@ import { User, UserRight } from '@shared/models'
10@Component({ 10@Component({
11 selector: 'my-video-comment', 11 selector: 'my-video-comment',
12 templateUrl: './video-comment.component.html', 12 templateUrl: './video-comment.component.html',
13 styleUrls: ['./video-comment.component.scss'] 13 styleUrls: [ './video-comment.component.scss' ]
14}) 14})
15export class VideoCommentComponent implements OnInit, OnChanges { 15export class VideoCommentComponent implements OnInit, OnChanges {
16 @ViewChild('commentReportModal') commentReportModal: CommentReportComponent 16 @ViewChild('commentReportModal') commentReportModal: CommentReportComponent
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts
index 72866b874..17e0af3bc 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts
@@ -9,7 +9,7 @@ import { VideoComment, VideoCommentService, VideoCommentThreadTree } from '@app/
9@Component({ 9@Component({
10 selector: 'my-video-comments', 10 selector: 'my-video-comments',
11 templateUrl: './video-comments.component.html', 11 templateUrl: './video-comments.component.html',
12 styleUrls: ['./video-comments.component.scss'] 12 styleUrls: [ './video-comments.component.scss' ]
13}) 13})
14export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { 14export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
15 @ViewChild('commentHighlightBlock') commentHighlightBlock: ElementRef 15 @ViewChild('commentHighlightBlock') commentHighlightBlock: ElementRef
@@ -200,7 +200,11 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
200 } 200 }
201 201
202 async onWantedToRedraft (commentToRedraft: VideoComment) { 202 async onWantedToRedraft (commentToRedraft: VideoComment) {
203 const confirm = await this.onWantedToDelete(commentToRedraft, $localize`Delete and re-draft`, $localize`Do you really want to delete and re-draft this comment?`) 203 const confirm = await this.onWantedToDelete(
204 commentToRedraft,
205 $localize`Delete and re-draft`,
206 $localize`Do you really want to delete and re-draft this comment?`
207 )
204 208
205 if (confirm) { 209 if (confirm) {
206 this.inReplyToCommentId = commentToRedraft.inReplyToCommentId 210 this.inReplyToCommentId = commentToRedraft.inReplyToCommentId
diff --git a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
index 0072492ac..257d463b4 100644
--- a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
@@ -23,7 +23,7 @@ export class VideoAlertComponent {
23 } 23 }
24 24
25 hasVideoScheduledPublication () { 25 hasVideoScheduledPublication () {
26 return this.video && this.video.scheduledUpdate !== undefined 26 return this.video?.scheduledUpdate !== undefined
27 } 27 }
28 28
29 isWaitingForLive () { 29 isWaitingForLive () {
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.html b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.html
index 57f682899..2cfaad8f6 100644
--- a/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.html
+++ b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.html
@@ -3,7 +3,7 @@
3 class="video-info-description-html" 3 class="video-info-description-html"
4 [innerHTML]="videoHTMLDescription" 4 [innerHTML]="videoHTMLDescription"
5 (timestampClicked)="onTimestampClicked($event)" 5 (timestampClicked)="onTimestampClicked($event)"
6 timestampRouteTransformer 6 myTimestampRouteTransformer
7 ></div> 7 ></div>
8 8
9 <div class="video-info-description-more" *ngIf="completeDescriptionShown === false && video.description?.length >= 250" (click)="showMoreDescription()"> 9 <div class="video-info-description-more" *ngIf="completeDescriptionShown === false && video.description?.length >= 250" (click)="showMoreDescription()">
diff --git a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
index f0f7966b1..78b3af4a7 100644
--- a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
@@ -39,7 +39,7 @@ export class VideoWatchPlaylistComponent {
39 private notifier: Notifier, 39 private notifier: Notifier,
40 private videoPlaylist: VideoPlaylistService, 40 private videoPlaylist: VideoPlaylistService,
41 private localStorageService: LocalStorageService, 41 private localStorageService: LocalStorageService,
42 private sessionStorageService: SessionStorageService, 42 private sessionStorage: SessionStorageService,
43 private router: Router 43 private router: Router
44 ) { 44 ) {
45 // defaults to true 45 // defaults to true
@@ -50,7 +50,7 @@ export class VideoWatchPlaylistComponent {
50 this.setAutoPlayNextVideoPlaylistSwitchText() 50 this.setAutoPlayNextVideoPlaylistSwitchText()
51 51
52 // defaults to false 52 // defaults to false
53 this.loopPlaylist = this.sessionStorageService.getItem(VideoWatchPlaylistComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO_PLAYLIST) === 'true' 53 this.loopPlaylist = this.sessionStorage.getItem(VideoWatchPlaylistComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO_PLAYLIST) === 'true'
54 this.setLoopPlaylistSwitchText() 54 this.setLoopPlaylistSwitchText()
55 } 55 }
56 56
@@ -145,7 +145,7 @@ export class VideoWatchPlaylistComponent {
145 145
146 const start = previous.startTimestamp 146 const start = previous.startTimestamp
147 const stop = previous.stopTimestamp 147 const stop = previous.stopTimestamp
148 this.router.navigate([],{ queryParams: { playlistPosition: previous.position, start, stop } }) 148 this.router.navigate([], { queryParams: { playlistPosition: previous.position, start, stop } })
149 } 149 }
150 150
151 findPlaylistVideo (position: number, type: 'previous' | 'next'): VideoPlaylistElement { 151 findPlaylistVideo (position: number, type: 'previous' | 'next'): VideoPlaylistElement {
@@ -163,7 +163,7 @@ export class VideoWatchPlaylistComponent {
163 } 163 }
164 164
165 const found = this.playlistElements.find(e => e.position === position) 165 const found = this.playlistElements.find(e => e.position === position)
166 if (found && found.video) return found 166 if (found?.video) return found
167 167
168 const newPosition = type === 'previous' 168 const newPosition = type === 'previous'
169 ? position - 1 169 ? position - 1
@@ -178,7 +178,7 @@ export class VideoWatchPlaylistComponent {
178 178
179 const start = next.startTimestamp 179 const start = next.startTimestamp
180 const stop = next.stopTimestamp 180 const stop = next.stopTimestamp
181 this.router.navigate([],{ queryParams: { playlistPosition: next.position, start, stop } }) 181 this.router.navigate([], { queryParams: { playlistPosition: next.position, start, stop } })
182 } 182 }
183 183
184 switchAutoPlayNextVideoPlaylist () { 184 switchAutoPlayNextVideoPlaylist () {
diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html
index e1040fead..bbfcab2ae 100644
--- a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html
+++ b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html
@@ -20,7 +20,7 @@
20 > 20 >
21 </my-video-miniature> 21 </my-video-miniature>
22 22
23 <hr *ngIf="!playlist && i == 0 && length > 1" /> 23 <hr *ngIf="!playlist && i === 0 && length > 1" />
24 </ng-container> 24 </ng-container>
25 </ng-container> 25 </ng-container>
26</div> 26</div>
diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.ts
index 7f3703c08..dfc296d15 100644
--- a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.ts
@@ -51,7 +51,7 @@ export class RecommendedVideosComponent implements OnInit, OnChanges {
51 } else { 51 } else {
52 this.autoPlayNextVideo = this.sessionStorageService.getItem(UserLocalStorageKeys.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' 52 this.autoPlayNextVideo = this.sessionStorageService.getItem(UserLocalStorageKeys.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true'
53 53
54 this.sessionStorageService.watch([UserLocalStorageKeys.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO]).subscribe( 54 this.sessionStorageService.watch([ UserLocalStorageKeys.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO ]).subscribe(
55 () => { 55 () => {
56 this.autoPlayNextVideo = this.sessionStorageService.getItem(UserLocalStorageKeys.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' 56 this.autoPlayNextVideo = this.sessionStorageService.getItem(UserLocalStorageKeys.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true'
57 } 57 }
diff --git a/client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts b/client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts
index 45e023695..91fe5bf5d 100644
--- a/client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts
+++ b/client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts
@@ -1,12 +1,12 @@
1import { Directive, EventEmitter, HostListener, Output } from '@angular/core' 1import { Directive, EventEmitter, HostListener, Output } from '@angular/core'
2 2
3@Directive({ 3@Directive({
4 selector: '[timestampRouteTransformer]' 4 selector: '[myTimestampRouteTransformer]'
5}) 5})
6export class TimestampRouteTransformerDirective { 6export class TimestampRouteTransformerDirective {
7 @Output() timestampClicked = new EventEmitter<number>() 7 @Output() timestampClicked = new EventEmitter<number>()
8 8
9 @HostListener('click', ['$event']) 9 @HostListener('click', [ '$event' ])
10 public onClick ($event: Event) { 10 public onClick ($event: Event) {
11 const target = $event.target as HTMLLinkElement 11 const target = $event.target as HTMLLinkElement
12 12
@@ -21,10 +21,10 @@ export class TimestampRouteTransformerDirective {
21 const ngxLinkParams = new URLSearchParams(ngxLink.search) 21 const ngxLinkParams = new URLSearchParams(ngxLink.search)
22 if (ngxLinkParams.has('start') !== true) return 22 if (ngxLinkParams.has('start') !== true) return
23 23
24 const separators = ['h', 'm', 's'] 24 const separators = [ 'h', 'm', 's' ]
25 const start = ngxLinkParams 25 const start = ngxLinkParams
26 .get('start') 26 .get('start')
27 .match(new RegExp('(\\d{1,9}[' + separators.join('') + '])','g')) // match digits before any given separator 27 .match(new RegExp('(\\d{1,9}[' + separators.join('') + '])', 'g')) // match digits before any given separator
28 .map(t => { 28 .map(t => {
29 if (t.includes('h')) return parseInt(t, 10) * 3600 29 if (t.includes('h')) return parseInt(t, 10) * 3600
30 if (t.includes('m')) return parseInt(t, 10) * 60 30 if (t.includes('m')) return parseInt(t, 10) * 60
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 85100b653..2007bdecb 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -195,10 +195,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
195 195
196 private loadRouteParams () { 196 private loadRouteParams () {
197 this.paramsSub = this.route.params.subscribe(routeParams => { 197 this.paramsSub = this.route.params.subscribe(routeParams => {
198 const videoId = routeParams[ 'videoId' ] 198 const videoId = routeParams['videoId']
199 if (videoId) return this.loadVideo(videoId) 199 if (videoId) return this.loadVideo(videoId)
200 200
201 const playlistId = routeParams[ 'playlistId' ] 201 const playlistId = routeParams['playlistId']
202 if (playlistId) return this.loadPlaylist(playlistId) 202 if (playlistId) return this.loadPlaylist(playlistId)
203 }) 203 })
204 } 204 }
@@ -206,7 +206,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
206 private loadRouteQuery () { 206 private loadRouteQuery () {
207 this.queryParamsSub = this.route.queryParams.subscribe(queryParams => { 207 this.queryParamsSub = this.route.queryParams.subscribe(queryParams => {
208 // Handle the ?playlistPosition 208 // Handle the ?playlistPosition
209 const positionParam = queryParams[ 'playlistPosition' ] ?? 1 209 const positionParam = queryParams['playlistPosition'] ?? 1
210 210
211 this.playlistPosition = positionParam === 'last' 211 this.playlistPosition = positionParam === 'last'
212 ? -1 // Handle the "last" index 212 ? -1 // Handle the "last" index
@@ -219,7 +219,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
219 219
220 this.videoWatchPlaylist.updatePlaylistIndex(this.playlistPosition) 220 this.videoWatchPlaylist.updatePlaylistIndex(this.playlistPosition)
221 221
222 const start = queryParams[ 'start' ] 222 const start = queryParams['start']
223 if (this.player && start) this.player.currentTime(parseInt(start, 10)) 223 if (this.player && start) this.player.currentTime(parseInt(start, 10))
224 }) 224 })
225 } 225 }
@@ -237,7 +237,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
237 'filter:api.video-watch.video.get.result' 237 'filter:api.video-watch.video.get.result'
238 ) 238 )
239 239
240 forkJoin([ videoObs, this.videoCaptionService.listCaptions(videoId)]) 240 forkJoin([ videoObs, this.videoCaptionService.listCaptions(videoId) ])
241 .subscribe({ 241 .subscribe({
242 next: ([ video, captionsResult ]) => { 242 next: ([ video, captionsResult ]) => {
243 const queryParams = this.route.snapshot.queryParams 243 const queryParams = this.route.snapshot.queryParams
@@ -292,6 +292,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
292 const originUrl = errorBody.originUrl + (window.location.search ?? '') 292 const originUrl = errorBody.originUrl + (window.location.search ?? '')
293 293
294 const res = await this.confirmService.confirm( 294 const res = await this.confirmService.confirm(
295 // eslint-disable-next-line max-len
295 $localize`This video is not available on this instance. Do you want to be redirected on the origin instance: <a href="${originUrl}">${originUrl}</a>?`, 296 $localize`This video is not available on this instance. Do you want to be redirected on the origin instance: <a href="${originUrl}">${originUrl}</a>?`,
296 $localize`Redirection` 297 $localize`Redirection`
297 ) 298 )
@@ -312,7 +313,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
312 if (!errorMessage) return 313 if (!errorMessage) return
313 314
314 // Display a message in the video player instead of a notification 315 // Display a message in the video player instead of a notification
315 if (errorMessage.indexOf('from xs param') !== -1) { 316 if (errorMessage.includes('from xs param')) {
316 this.flushPlayer() 317 this.flushPlayer()
317 this.remoteServerDown = true 318 this.remoteServerDown = true
318 319
@@ -466,7 +467,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
466 467
467 if (this.nextVideoUUID) { 468 if (this.nextVideoUUID) {
468 this.router.navigate([ '/w', this.nextVideoUUID ]) 469 this.router.navigate([ '/w', this.nextVideoUUID ])
469 return
470 } 470 }
471 } 471 }
472 472
@@ -483,14 +483,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
483 483
484 private isAutoPlayNext () { 484 private isAutoPlayNext () {
485 return ( 485 return (
486 (this.user && this.user.autoPlayNextVideo) || 486 (this.user?.autoPlayNextVideo) ||
487 this.anonymousUser.autoPlayNextVideo 487 this.anonymousUser.autoPlayNextVideo
488 ) 488 )
489 } 489 }
490 490
491 private isPlaylistAutoPlayNext () { 491 private isPlaylistAutoPlayNext () {
492 return ( 492 return (
493 (this.user && this.user.autoPlayNextVideoPlaylist) || 493 (this.user?.autoPlayNextVideoPlaylist) ||
494 this.anonymousUser.autoPlayNextVideoPlaylist 494 this.anonymousUser.autoPlayNextVideoPlaylist
495 ) 495 )
496 } 496 }
@@ -508,9 +508,9 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
508 } 508 }
509 509
510 private buildPlayerManagerOptions (params: { 510 private buildPlayerManagerOptions (params: {
511 video: VideoDetails, 511 video: VideoDetails
512 videoCaptions: VideoCaption[], 512 videoCaptions: VideoCaption[]
513 urlOptions: CustomizationOptions & { playerMode: PlayerMode }, 513 urlOptions: CustomizationOptions & { playerMode: PlayerMode }
514 user?: AuthUser 514 user?: AuthUser
515 }) { 515 }) {
516 const { video, videoCaptions, urlOptions, user } = params 516 const { video, videoCaptions, urlOptions, user } = params
@@ -573,10 +573,12 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
573 573
574 language: this.localeId, 574 language: this.localeId,
575 575
576 userWatching: user && user.videosHistoryEnabled === true ? { 576 userWatching: user && user.videosHistoryEnabled === true
577 url: this.videoService.getUserWatchingVideoUrl(video.uuid), 577 ? {
578 authorizationHeader: this.authService.getRequestHeaderValue() 578 url: this.videoService.getUserWatchingVideoUrl(video.uuid),
579 } : undefined, 579 authorizationHeader: this.authService.getRequestHeaderValue()
580 }
581 : undefined,
580 582
581 serverUrl: environment.apiUrl, 583 serverUrl: environment.apiUrl,
582 584
@@ -704,9 +706,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
704 if (this.isUserLoggedIn()) { 706 if (this.isUserLoggedIn()) {
705 this.hotkeys = this.hotkeys.concat([ 707 this.hotkeys = this.hotkeys.concat([
706 new Hotkey('shift+s', () => { 708 new Hotkey('shift+s', () => {
707 this.subscribeButton.isSubscribedToAll() 709 if (this.subscribeButton.isSubscribedToAll()) this.subscribeButton.unsubscribe()
708 ? this.subscribeButton.unsubscribe() 710 else this.subscribeButton.subscribe()
709 : this.subscribeButton.subscribe()
710 711
711 return false 712 return false
712 }, undefined, $localize`Subscribe to the account`) 713 }, undefined, $localize`Subscribe to the account`)
diff --git a/client/src/app/+videos/video-list/overview/overview.service.ts b/client/src/app/+videos/video-list/overview/overview.service.ts
index 3aa64ebc8..12d2aa1cb 100644
--- a/client/src/app/+videos/video-list/overview/overview.service.ts
+++ b/client/src/app/+videos/video-list/overview/overview.service.ts
@@ -43,7 +43,7 @@ export class OverviewService {
43 43
44 // Build videos objects 44 // Build videos objects
45 for (const key of Object.keys(serverVideosOverview)) { 45 for (const key of Object.keys(serverVideosOverview)) {
46 for (const object of serverVideosOverview[ key ]) { 46 for (const object of serverVideosOverview[key]) {
47 observables.push( 47 observables.push(
48 of(object.videos) 48 of(object.videos)
49 .pipe( 49 .pipe(
diff --git a/client/src/app/+videos/video-list/trending/video-trending-header.component.ts b/client/src/app/+videos/video-list/trending/video-trending-header.component.ts
index 6c2b32a4f..c94655c74 100644
--- a/client/src/app/+videos/video-list/trending/video-trending-header.component.ts
+++ b/client/src/app/+videos/video-list/trending/video-trending-header.component.ts
@@ -15,7 +15,7 @@ interface VideoTrendingHeaderItem {
15} 15}
16 16
17@Component({ 17@Component({
18 selector: 'video-trending-title-page', 18 selector: 'my-video-trending-title-page',
19 styleUrls: [ './video-trending-header.component.scss' ], 19 styleUrls: [ './video-trending-header.component.scss' ],
20 templateUrl: './video-trending-header.component.html' 20 templateUrl: './video-trending-header.component.html'
21}) 21})
diff --git a/client/src/app/+videos/video-list/trending/video-trending.component.ts b/client/src/app/+videos/video-list/trending/video-trending.component.ts
index ebec672f3..085f29a8b 100644
--- a/client/src/app/+videos/video-list/trending/video-trending.component.ts
+++ b/client/src/app/+videos/video-list/trending/video-trending.component.ts
@@ -63,7 +63,7 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit,
63 63
64 if (oldSort !== this.sort) this.reloadVideos() 64 if (oldSort !== this.sort) this.reloadVideos()
65 } 65 }
66 ) 66 )
67 } 67 }
68 68
69 ngOnDestroy () { 69 ngOnDestroy () {
@@ -97,12 +97,12 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit,
97 97
98 getInjector () { 98 getInjector () {
99 return Injector.create({ 99 return Injector.create({
100 providers: [{ 100 providers: [ {
101 provide: 'data', 101 provide: 'data',
102 useValue: { 102 useValue: {
103 model: this.defaultSort 103 model: this.defaultSort
104 } 104 }
105 }] 105 } ]
106 }) 106 })
107 } 107 }
108 108
diff --git a/client/src/app/+videos/video-list/video-local.component.ts b/client/src/app/+videos/video-list/video-local.component.ts
index 4be8cd6b5..b576883d1 100644
--- a/client/src/app/+videos/video-list/video-local.component.ts
+++ b/client/src/app/+videos/video-list/video-local.component.ts
@@ -5,7 +5,7 @@ import { HooksService } from '@app/core/plugins/hooks.service'
5import { immutableAssign } from '@app/helpers' 5import { immutableAssign } from '@app/helpers'
6import { VideoService } from '@app/shared/shared-main' 6import { VideoService } from '@app/shared/shared-main'
7import { AbstractVideoList } from '@app/shared/shared-video-miniature' 7import { AbstractVideoList } from '@app/shared/shared-video-miniature'
8import { UserRight, VideoFilter, VideoSortField } from '@shared/models' 8import { VideoFilter, VideoSortField } from '@shared/models'
9 9
10@Component({ 10@Component({
11 selector: 'my-videos-local', 11 selector: 'my-videos-local',