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, VideoService } from '../../shared-main'
+import { VideoSortField } from '@shared/models'
+import { Video, VideoChannel, VideoService } from '../../shared-main'
import { CustomMarkupComponent } from './shared'
/*
ngOnInit () {
this.findInBulk.getChannel(this.name)
.pipe(
- tap(channel => this.channel = channel),
+ tap(channel => {
+ this.channel = channel
+ }),
switchMap(() => from(this.markdown.textMarkdownToHTML(this.channel.description))),
- tap(html => this.descriptionHTML = html),
+ tap(html => {
+ this.descriptionHTML = html
+ }),
switchMap(() => this.loadVideosObservable()),
finalize(() => this.loaded.emit(true))
- ).subscribe(
- ({ total, data }) => {
+ ).subscribe({
+ next: ({ total, data }) => {
this.totalVideos = total
this.video = data[0]
},
- err => this.notifier.error('Error in channel miniature component: ' + err.message)
- )
+ error: err => this.notifier.error($localize`Error in channel miniature component: ${err.message}`)
+ })
}
getVideoChannelLink () {