Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Don't crash on unknown youtube-dl date

Chocobozzzc9a2f652fa26
diff --git a/server/core/lib/video-pre-import.ts b/server/core/lib/video-pre-import.ts
index a1b61a1e55..8e7008985a 100644
--- a/server/core/lib/video-pre-import.ts
+++ b/server/core/lib/video-pre-import.ts
@@ -189,7 +189,7 @@ export async function buildYoutubeDLImport (options: {
// Get video infos
const youtubeDLInfo = await youtubeDL.getInfoForDownload({ userLanguage })
- if (skipPublishedBeforeOrEq) {
+ if (skipPublishedBeforeOrEq && youtubeDLInfo.originallyPublishedAtWithoutTime) {
const onlyAfterWithoutTime = new Date(skipPublishedBeforeOrEq)
onlyAfterWithoutTime.setHours(0, 0, 0, 0)