aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-14 16:05:25 +0200
committerChocobozzz <me@florianbigard.com>2021-06-14 16:05:25 +0200
commita9fbc2aaa17ab74b38952f905c567c4fd2c9d9e8 (patch)
tree03a7baef63ccd1a7b2e05ca0239c589b0d7e4647 /server
parentc5c848c50b603a506d8da74fa073cbf67e9edbb4 (diff)
downloadPeerTube-a9fbc2aaa17ab74b38952f905c567c4fd2c9d9e8.tar.gz
PeerTube-a9fbc2aaa17ab74b38952f905c567c4fd2c9d9e8.tar.zst
PeerTube-a9fbc2aaa17ab74b38952f905c567c4fd2c9d9e8.zip
Handle short video links
Diffstat (limited to 'server')
-rw-r--r--server/lib/activitypub/videos/get.ts2
1 files changed, 2 insertions, 0 deletions
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 (
61 const { videoObject } = await fetchRemoteVideo(videoUrl) 61 const { videoObject } = await fetchRemoteVideo(videoUrl)
62 if (!videoObject) throw new Error('Cannot fetch remote video with url: ' + videoUrl) 62 if (!videoObject) throw new Error('Cannot fetch remote video with url: ' + videoUrl)
63 63
64 if (videoObject.id !== videoUrl) return getOrCreateAPVideo({ ...options, fetchType: 'all', videoObject })
65
64 try { 66 try {
65 const creator = new APVideoCreator(videoObject) 67 const creator = new APVideoCreator(videoObject)
66 const { autoBlacklisted, videoCreated } = await retryTransactionWrapper(creator.create.bind(creator), syncParam.thumbnail) 68 const { autoBlacklisted, videoCreated } = await retryTransactionWrapper(creator.create.bind(creator), syncParam.thumbnail)