+import { SortMeta } from 'primeng/api'
+import { mergeMap } from 'rxjs'
import { Component, OnInit } from '@angular/core'
import { AuthService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
import { DropdownAction, VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main'
import { HTMLServerConfig } from '@shared/models/server'
import { VideoChannelSync, VideoChannelSyncState } from '@shared/models/videos'
-import { SortMeta } from 'primeng/api'
-import { mergeMap } from 'rxjs'
@Component({
templateUrl: './my-video-channel-syncs.component.html',
this.initialize()
this.videoChannelSyncActions = [
+ [
+ {
+ label: $localize`List imports`,
+ linkBuilder: () => [ '/my-library/video-imports' ],
+ queryParamsBuilder: sync => ({ search: `videoChannelSyncId:${sync.id}` }),
+ iconName: 'cloud-download'
+ }
+ ],
[
{
label: $localize`Delete`,
.subscribe({
next: res => {
this.channelSyncs = res.data
+ this.totalRecords = res.total
},
error: err => {
this.error = err.message
}
fullySynchronize (videoChannelSync: VideoChannelSync) {
- this.videoChannelService.importVideos(videoChannelSync.channel.name, videoChannelSync.externalChannelUrl)
+ this.videoChannelService.importVideos(videoChannelSync.channel.name, videoChannelSync.externalChannelUrl, videoChannelSync.id)
.subscribe({
next: () => {
this.notifier.success($localize`Full synchronization requested successfully for ${videoChannelSync.channel.displayName}.`)