diff options
Diffstat (limited to 'client/src/app/shared/shared-custom-markup/peertube-custom-tags')
3 files changed, 11 insertions, 8 deletions
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 7043a7ec9..bb099deae 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 | |||
@@ -2,8 +2,9 @@ import { from } from 'rxjs' | |||
2 | import { finalize, map, switchMap, tap } from 'rxjs/operators' | 2 | 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 { Video, VideoSortField } from '@shared/models/videos' | 6 | import { Video, VideoSortField } from '@shared/models/videos' |
6 | import { VideoChannel, VideoChannelService, VideoService } from '../../shared-main' | 7 | import { VideoChannel, VideoService } from '../../shared-main' |
7 | import { CustomMarkupComponent } from './shared' | 8 | import { CustomMarkupComponent } from './shared' |
8 | 9 | ||
9 | /* | 10 | /* |
@@ -29,14 +30,14 @@ export class ChannelMiniatureMarkupComponent implements CustomMarkupComponent, O | |||
29 | 30 | ||
30 | constructor ( | 31 | constructor ( |
31 | private markdown: MarkdownService, | 32 | private markdown: MarkdownService, |
32 | private channelService: VideoChannelService, | 33 | private findInBulk: FindInBulkService, |
33 | private videoService: VideoService, | 34 | private videoService: VideoService, |
34 | private userService: UserService, | 35 | private userService: UserService, |
35 | private notifier: Notifier | 36 | private notifier: Notifier |
36 | ) { } | 37 | ) { } |
37 | 38 | ||
38 | ngOnInit () { | 39 | ngOnInit () { |
39 | this.channelService.getVideoChannel(this.name) | 40 | this.findInBulk.getChannel(this.name) |
40 | .pipe( | 41 | .pipe( |
41 | tap(channel => this.channel = channel), | 42 | tap(channel => this.channel = channel), |
42 | switchMap(() => from(this.markdown.textMarkdownToHTML(this.channel.description))), | 43 | switchMap(() => from(this.markdown.textMarkdownToHTML(this.channel.description))), |
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts index ff8cc01db..97d31c4a7 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts | |||
@@ -1,8 +1,9 @@ | |||
1 | import { finalize } from 'rxjs/operators' | 1 | import { finalize } from 'rxjs/operators' |
2 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 2 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
3 | import { Notifier } from '@app/core' | 3 | import { Notifier } from '@app/core' |
4 | import { FindInBulkService } from '@app/shared/shared-search' | ||
4 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' | 5 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' |
5 | import { VideoPlaylist, VideoPlaylistService } from '../../shared-video-playlist' | 6 | import { VideoPlaylist } from '../../shared-video-playlist' |
6 | import { CustomMarkupComponent } from './shared' | 7 | import { CustomMarkupComponent } from './shared' |
7 | 8 | ||
8 | /* | 9 | /* |
@@ -33,12 +34,12 @@ export class PlaylistMiniatureMarkupComponent implements CustomMarkupComponent, | |||
33 | } | 34 | } |
34 | 35 | ||
35 | constructor ( | 36 | constructor ( |
36 | private playlistService: VideoPlaylistService, | 37 | private findInBulkService: FindInBulkService, |
37 | private notifier: Notifier | 38 | private notifier: Notifier |
38 | ) { } | 39 | ) { } |
39 | 40 | ||
40 | ngOnInit () { | 41 | ngOnInit () { |
41 | this.playlistService.getVideoPlaylist(this.uuid) | 42 | this.findInBulkService.getPlaylist(this.uuid) |
42 | .pipe(finalize(() => this.loaded.emit(true))) | 43 | .pipe(finalize(() => this.loaded.emit(true))) |
43 | .subscribe( | 44 | .subscribe( |
44 | playlist => this.playlist = playlist, | 45 | playlist => this.playlist = playlist, |
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 47518abfd..ba61aaf51 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 | |||
@@ -4,6 +4,7 @@ import { AuthService, Notifier } from '@app/core' | |||
4 | import { Video, VideoService } from '../../shared-main' | 4 | import { Video, VideoService } from '../../shared-main' |
5 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' | 5 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' |
6 | import { CustomMarkupComponent } from './shared' | 6 | import { CustomMarkupComponent } from './shared' |
7 | import { FindInBulkService } from '@app/shared/shared-search' | ||
7 | 8 | ||
8 | /* | 9 | /* |
9 | * Markup component that creates a video miniature only | 10 | * Markup component that creates a video miniature only |
@@ -35,7 +36,7 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI | |||
35 | 36 | ||
36 | constructor ( | 37 | constructor ( |
37 | private auth: AuthService, | 38 | private auth: AuthService, |
38 | private videoService: VideoService, | 39 | private findInBulk: FindInBulkService, |
39 | private notifier: Notifier | 40 | private notifier: Notifier |
40 | ) { } | 41 | ) { } |
41 | 42 | ||
@@ -50,7 +51,7 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI | |||
50 | } | 51 | } |
51 | } | 52 | } |
52 | 53 | ||
53 | this.videoService.getVideo({ videoId: this.uuid }) | 54 | this.findInBulk.getVideo(this.uuid) |
54 | .pipe(finalize(() => this.loaded.emit(true))) | 55 | .pipe(finalize(() => this.loaded.emit(true))) |
55 | .subscribe( | 56 | .subscribe( |
56 | video => this.video = video, | 57 | video => this.video = video, |