Handle short video links

pull/4187/head
Chocobozzz 2021-06-14 16:05:25 +02:00
parent c5c848c50b
commit a9fbc2aaa1
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 0 deletions

View File

@ -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)