]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts
Fetch things in bulk for the homepage
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-custom-markup / peertube-custom-tags / channel-miniature-markup.component.ts
index 7043a7ec95ee1f7681453528ae542cc375d493f4..bb099deae476233b702dbdd5b2c7133f818eb9df 100644 (file)
@@ -2,8 +2,9 @@ import { from } from 'rxjs'
 import { finalize, map, switchMap, tap } from 'rxjs/operators'
 import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
 import { MarkdownService, Notifier, UserService } from '@app/core'
+import { FindInBulkService } from '@app/shared/shared-search'
 import { Video, VideoSortField } from '@shared/models/videos'
-import { VideoChannel, VideoChannelService, VideoService } from '../../shared-main'
+import { VideoChannel, VideoService } from '../../shared-main'
 import { CustomMarkupComponent } from './shared'
 
 /*
@@ -29,14 +30,14 @@ export class ChannelMiniatureMarkupComponent implements CustomMarkupComponent, O
 
   constructor (
     private markdown: MarkdownService,
-    private channelService: VideoChannelService,
+    private findInBulk: FindInBulkService,
     private videoService: VideoService,
     private userService: UserService,
     private notifier: Notifier
   ) { }
 
   ngOnInit () {
-    this.channelService.getVideoChannel(this.name)
+    this.findInBulk.getChannel(this.name)
       .pipe(
         tap(channel => this.channel = channel),
         switchMap(() => from(this.markdown.textMarkdownToHTML(this.channel.description))),