diff options
Diffstat (limited to 'server/tools/peertube-import-videos.ts')
-rw-r--r-- | server/tools/peertube-import-videos.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts index 151c5a989..4032c5e0d 100644 --- a/server/tools/peertube-import-videos.ts +++ b/server/tools/peertube-import-videos.ts | |||
@@ -212,6 +212,8 @@ async function uploadVideoOnPeerTube (videoInfo: any, videoPath: string, cwd: st | |||
212 | }, thumbnailfile) | 212 | }, thumbnailfile) |
213 | } | 213 | } |
214 | 214 | ||
215 | const date = videoInfo.upload_date.slice(0,4) + ',' + videoInfo.upload_date.slice(4,6) + ',' + videoInfo.upload_date.slice(6,8) | ||
216 | |||
215 | const videoAttributes = { | 217 | const videoAttributes = { |
216 | name: truncate(videoInfo.title, { | 218 | name: truncate(videoInfo.title, { |
217 | 'length': CONSTRAINTS_FIELDS.VIDEOS.NAME.max, | 219 | 'length': CONSTRAINTS_FIELDS.VIDEOS.NAME.max, |
@@ -231,7 +233,8 @@ async function uploadVideoOnPeerTube (videoInfo: any, videoPath: string, cwd: st | |||
231 | privacy: VideoPrivacy.PUBLIC, | 233 | privacy: VideoPrivacy.PUBLIC, |
232 | fixture: videoPath, | 234 | fixture: videoPath, |
233 | thumbnailfile, | 235 | thumbnailfile, |
234 | previewfile: thumbnailfile | 236 | previewfile: thumbnailfile, |
237 | originallyPublishedAt: new Date(date).toISOString() | ||
235 | } | 238 | } |
236 | 239 | ||
237 | console.log('\nUploading on PeerTube video "%s".', videoAttributes.name) | 240 | console.log('\nUploading on PeerTube video "%s".', videoAttributes.name) |