- this.channelService.getVideoChannel(this.name)
- .subscribe(async channel => {
- this.channel = channel
-
- this.descriptionHTML = await this.markdown.textMarkdownToHTML(channel.description)
+ this.findInBulk.getChannel(this.name)
+ .pipe(
+ tap(channel => {
+ this.channel = channel
+ }),
+ switchMap(() => from(this.markdown.textMarkdownToHTML({
+ markdown: this.channel.description,
+ withEmoji: true,
+ withHtml: true
+ }))),
+ tap(html => {
+ this.descriptionHTML = html
+ }),
+ switchMap(() => this.loadVideosObservable()),
+ finalize(() => this.loaded.emit(true))
+ ).subscribe({
+ next: ({ total, data }) => {
+ this.totalVideos = total
+ this.video = data[0]
+ },