From a9fbc2aaa17ab74b38952f905c567c4fd2c9d9e8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 14 Jun 2021 16:05:25 +0200 Subject: Handle short video links --- server/lib/activitypub/videos/get.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server/lib/activitypub/videos') diff --git a/server/lib/activitypub/videos/get.ts b/server/lib/activitypub/videos/get.ts index 5d1f92bba..f0982bd98 100644 --- a/server/lib/activitypub/videos/get.ts +++ b/server/lib/activitypub/videos/get.ts @@ -61,6 +61,8 @@ async function getOrCreateAPVideo ( const { videoObject } = await fetchRemoteVideo(videoUrl) if (!videoObject) throw new Error('Cannot fetch remote video with url: ' + videoUrl) + if (videoObject.id !== videoUrl) return getOrCreateAPVideo({ ...options, fetchType: 'all', videoObject }) + try { const creator = new APVideoCreator(videoObject) const { autoBlacklisted, videoCreated } = await retryTransactionWrapper(creator.create.bind(creator), syncParam.thumbnail) -- cgit v1.2.3