aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/sync-channel.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-10 11:51:13 +0200
committerChocobozzz <me@florianbigard.com>2022-08-10 14:32:00 +0200
commita3b472a12ec6e57dbe2f650419f8064864686eab (patch)
treef36559488e34493c029b686772e986902150a647 /server/lib/sync-channel.ts
parent0567049a9819d67070aa6d548a75a7e632a4aaa4 (diff)
downloadPeerTube-a3b472a12ec6e57dbe2f650419f8064864686eab.tar.gz
PeerTube-a3b472a12ec6e57dbe2f650419f8064864686eab.tar.zst
PeerTube-a3b472a12ec6e57dbe2f650419f8064864686eab.zip
Add ability to list imports of a channel sync
Diffstat (limited to 'server/lib/sync-channel.ts')
-rw-r--r--server/lib/sync-channel.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/lib/sync-channel.ts b/server/lib/sync-channel.ts
index 50f80e6f9..eb5ca1703 100644
--- a/server/lib/sync-channel.ts
+++ b/server/lib/sync-channel.ts
@@ -18,6 +18,12 @@ export async function synchronizeChannel (options: {
18}) { 18}) {
19 const { channel, externalChannelUrl, videosCountLimit, onlyAfter, channelSync } = options 19 const { channel, externalChannelUrl, videosCountLimit, onlyAfter, channelSync } = options
20 20
21 if (channelSync) {
22 channelSync.state = VideoChannelSyncState.PROCESSING
23 channelSync.lastSyncAt = new Date()
24 await channelSync.save()
25 }
26
21 const user = await UserModel.loadByChannelActorId(channel.actorId) 27 const user = await UserModel.loadByChannelActorId(channel.actorId)
22 const youtubeDL = new YoutubeDLWrapper( 28 const youtubeDL = new YoutubeDLWrapper(
23 externalChannelUrl, 29 externalChannelUrl,
@@ -70,6 +76,7 @@ export async function synchronizeChannel (options: {
70 children.push(job) 76 children.push(job)
71 } 77 }
72 78
79 // Will update the channel sync status
73 const parent: CreateJobArgument = { 80 const parent: CreateJobArgument = {
74 type: 'after-video-channel-import', 81 type: 'after-video-channel-import',
75 payload: { 82 payload: {