aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/videos.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index 34685b6b1..cd1bc4e06 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -455,11 +455,11 @@ async function videoActivityObjectToDBAttributes (
455 } 455 }
456} 456}
457 457
458function videoFileActivityUrlToDBAttributes (videoCreated: VideoModel, videoObject: VideoTorrentObject) { 458function videoFileActivityUrlToDBAttributes (video: VideoModel, videoObject: VideoTorrentObject) {
459 const fileUrls = videoObject.url.filter(u => isActivityVideoUrlObject(u)) as ActivityVideoUrlObject[] 459 const fileUrls = videoObject.url.filter(u => isActivityVideoUrlObject(u)) as ActivityVideoUrlObject[]
460 460
461 if (fileUrls.length === 0) { 461 if (fileUrls.length === 0) {
462 throw new Error('Cannot find video files for ' + videoCreated.url) 462 throw new Error('Cannot find video files for ' + video.url)
463 } 463 }
464 464
465 const attributes: VideoFileModel[] = [] 465 const attributes: VideoFileModel[] = []
@@ -481,7 +481,7 @@ function videoFileActivityUrlToDBAttributes (videoCreated: VideoModel, videoObje
481 infoHash: parsed.infoHash, 481 infoHash: parsed.infoHash,
482 resolution: fileUrl.height, 482 resolution: fileUrl.height,
483 size: fileUrl.size, 483 size: fileUrl.size,
484 videoId: videoCreated.id, 484 videoId: video.id,
485 fps: fileUrl.fps || -1 485 fps: fileUrl.fps || -1
486 } as VideoFileModel 486 } as VideoFileModel
487 attributes.push(attribute) 487 attributes.push(attribute)