diff options
Diffstat (limited to 'client/src')
3 files changed, 6 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.html b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.html index 2efc56ab2..de150aac9 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.html +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.html | |||
@@ -23,6 +23,6 @@ | |||
23 | <div class="video" *ngIf="video && displayLatestVideo"> | 23 | <div class="video" *ngIf="video && displayLatestVideo"> |
24 | <div i18n class="video-label">Latest published video</div> | 24 | <div i18n class="video-label">Latest published video</div> |
25 | 25 | ||
26 | <my-video-miniature-markup [uuid]="video.uuid" [onlyDisplayTitle]="true"></my-video-miniature-markup> | 26 | <my-video-miniature-markup [video]="video" [onlyDisplayTitle]="true"></my-video-miniature-markup> |
27 | </div> | 27 | </div> |
28 | </div> | 28 | </div> |
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts index 35b413b60..e9c466a90 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts | |||
@@ -3,8 +3,8 @@ import { finalize, map, switchMap, tap } from 'rxjs/operators' | |||
3 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 3 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
4 | import { MarkdownService, Notifier, UserService } from '@app/core' | 4 | import { MarkdownService, Notifier, UserService } from '@app/core' |
5 | import { FindInBulkService } from '@app/shared/shared-search' | 5 | import { FindInBulkService } from '@app/shared/shared-search' |
6 | import { Video, VideoSortField } from '@shared/models/videos' | 6 | import { VideoSortField } from '@shared/models' |
7 | import { VideoChannel, VideoService } from '../../shared-main' | 7 | import { Video, VideoChannel, VideoService } from '../../shared-main' |
8 | import { CustomMarkupComponent } from './shared' | 8 | import { CustomMarkupComponent } from './shared' |
9 | 9 | ||
10 | /* | 10 | /* |
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' | |||
18 | export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnInit { | 18 | export 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({ |