diff options
Diffstat (limited to 'server/lib/sync-channel.ts')
-rw-r--r-- | server/lib/sync-channel.ts | 7 |
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: { |