aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-18 15:41:20 +0200
committerChocobozzz <me@florianbigard.com>2021-10-18 15:41:20 +0200
commite9609325170f58346b015477b52325a7dde20f4e (patch)
treedf28fc4a398e03cb01c9974b757822813f56c4c5 /client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
parent2cc276f92fefeff88fcc74217e1174a3ddb3f074 (diff)
downloadPeerTube-e9609325170f58346b015477b52325a7dde20f4e.tar.gz
PeerTube-e9609325170f58346b015477b52325a7dde20f4e.tar.zst
PeerTube-e9609325170f58346b015477b52325a7dde20f4e.zip
Optimize channel with video in homepage
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.ts5
1 files changed, 3 insertions, 2 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 7315126e0..cbbacf77c 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
@@ -18,11 +18,10 @@ import { CustomMarkupComponent } from './shared'
18export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnInit { 18export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnInit {
19 @Input() uuid: string 19 @Input() uuid: string
20 @Input() onlyDisplayTitle: boolean 20 @Input() onlyDisplayTitle: boolean
21 @Input() video: Video
21 22
22 @Output() loaded = new EventEmitter<boolean>() 23 @Output() loaded = new EventEmitter<boolean>()
23 24
24 video: Video
25
26 displayOptions: MiniatureDisplayOptions = { 25 displayOptions: MiniatureDisplayOptions = {
27 date: true, 26 date: true,
28 views: true, 27 views: true,
@@ -51,6 +50,8 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI
51 } 50 }
52 } 51 }
53 52
53 if (this.video) return
54
54 this.findInBulk.getVideo(this.uuid) 55 this.findInBulk.getVideo(this.uuid)
55 .pipe(finalize(() => this.loaded.emit(true))) 56 .pipe(finalize(() => this.loaded.emit(true)))
56 .subscribe({ 57 .subscribe({