]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts
Merge branch 'release/4.3.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-library / my-video-channel-syncs / my-video-channel-syncs.component.ts
index 81bdaf9f248233f7320fd622e968f90768c1dd9e..d18e78201c2dc428afb1f9dfd5d4912e14f9dc7e 100644 (file)
@@ -1,10 +1,10 @@
+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',
@@ -44,6 +44,14 @@ export class MyVideoChannelSyncsComponent extends RestTable implements OnInit {
     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`,
@@ -75,6 +83,7 @@ export class MyVideoChannelSyncsComponent extends RestTable implements OnInit {
       .subscribe({
         next: res => {
           this.channelSyncs = res.data
+          this.totalRecords = res.total
         },
         error: err => {
           this.error = err.message
@@ -100,7 +109,7 @@ export class MyVideoChannelSyncsComponent extends RestTable implements OnInit {
   }
 
   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}.`)