mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-27 19:20:39 -06:00
Handle short video links
This commit is contained in:
parent
c5c848c50b
commit
a9fbc2aaa1
@ -61,6 +61,8 @@ async function getOrCreateAPVideo (
|
|||||||
const { videoObject } = await fetchRemoteVideo(videoUrl)
|
const { videoObject } = await fetchRemoteVideo(videoUrl)
|
||||||
if (!videoObject) throw new Error('Cannot fetch remote video with url: ' + videoUrl)
|
if (!videoObject) throw new Error('Cannot fetch remote video with url: ' + videoUrl)
|
||||||
|
|
||||||
|
if (videoObject.id !== videoUrl) return getOrCreateAPVideo({ ...options, fetchType: 'all', videoObject })
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const creator = new APVideoCreator(videoObject)
|
const creator = new APVideoCreator(videoObject)
|
||||||
const { autoBlacklisted, videoCreated } = await retryTransactionWrapper(creator.create.bind(creator), syncParam.thumbnail)
|
const { autoBlacklisted, videoCreated } = await retryTransactionWrapper(creator.create.bind(creator), syncParam.thumbnail)
|
||||||
|
Loading…
Reference in New Issue
Block a user