X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-custom-markup%2Fpeertube-custom-tags%2Fvideo-miniature-markup.component.ts;h=cbbacf77c65d6833b14553c6a1424d97b158ced7;hb=2760b454a761f6af3138b2fb5f34340772ab0d1e;hp=56b43d85e287668d69463d9cb3c48b6e11f827b8;hpb=1378c0d343028f3d40d7d795422684ab9e6a1599;p=github%2FChocobozzz%2FPeerTube.git 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 56b43d85e..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 @@ -1,10 +1,10 @@ import { finalize } from 'rxjs/operators' import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' import { AuthService, Notifier } from '@app/core' -import { Video, VideoService } from '../../shared-main' +import { FindInBulkService } from '@app/shared/shared-search' +import { Video } from '../../shared-main' import { MiniatureDisplayOptions } from '../../shared-video-miniature' import { CustomMarkupComponent } from './shared' -import { FindInBulkService } from '@app/shared/shared-search' /* * Markup component that creates a video miniature only @@ -18,11 +18,10 @@ import { FindInBulkService } from '@app/shared/shared-search' export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnInit { @Input() uuid: string @Input() onlyDisplayTitle: boolean + @Input() video: Video @Output() loaded = new EventEmitter() - video: Video - displayOptions: MiniatureDisplayOptions = { date: true, views: true, @@ -51,6 +50,8 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI } } + if (this.video) return + this.findInBulk.getVideo(this.uuid) .pipe(finalize(() => this.loaded.emit(true))) .subscribe({