aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts')
-rw-r--r--client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts15
1 files changed, 9 insertions, 6 deletions
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
index 6ee5123e0..47518abfd 100644
--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
@@ -1,5 +1,6 @@
1import { finalize } from 'rxjs/operators'
1import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' 2import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
2import { AuthService } from '@app/core' 3import { AuthService, Notifier } from '@app/core'
3import { Video, VideoService } from '../../shared-main' 4import { Video, VideoService } from '../../shared-main'
4import { MiniatureDisplayOptions } from '../../shared-video-miniature' 5import { MiniatureDisplayOptions } from '../../shared-video-miniature'
5import { CustomMarkupComponent } from './shared' 6import { CustomMarkupComponent } from './shared'
@@ -34,7 +35,8 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI
34 35
35 constructor ( 36 constructor (
36 private auth: AuthService, 37 private auth: AuthService,
37 private videoService: VideoService 38 private videoService: VideoService,
39 private notifier: Notifier
38 ) { } 40 ) { }
39 41
40 getUser () { 42 getUser () {
@@ -49,10 +51,11 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI
49 } 51 }
50 52
51 this.videoService.getVideo({ videoId: this.uuid }) 53 this.videoService.getVideo({ videoId: this.uuid })
52 .subscribe({ 54 .pipe(finalize(() => this.loaded.emit(true)))
53 next: video => this.video = video, 55 .subscribe(
56 video => this.video = video,
54 57
55 complete: () => this.loaded.emit(true) 58 err => this.notifier.error('Error in video miniature component: ' + err.message)
56 }) 59 )
57 } 60 }
58} 61}