aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/lib/activitypub/videos.ts4
-rw-r--r--server/lib/cache/videos-preview-cache.ts1
2 files changed, 3 insertions, 2 deletions
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index ded854ee1..83f3e9933 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -22,7 +22,9 @@ function fetchRemoteVideoPreview (video: VideoModel, reject: Function) {
22 const host = video.VideoChannel.Account.Actor.Server.host 22 const host = video.VideoChannel.Account.Actor.Server.host
23 const path = join(STATIC_PATHS.PREVIEWS, video.getPreviewName()) 23 const path = join(STATIC_PATHS.PREVIEWS, video.getPreviewName())
24 24
25 return request.get(REMOTE_SCHEME.HTTP + '://' + host + path, err => reject(err)) 25 return request.get(REMOTE_SCHEME.HTTP + '://' + host + path, err => {
26 if (err) reject(err)
27 })
26} 28}
27 29
28async function fetchRemoteVideoDescription (video: VideoModel) { 30async function fetchRemoteVideoDescription (video: VideoModel) {
diff --git a/server/lib/cache/videos-preview-cache.ts b/server/lib/cache/videos-preview-cache.ts
index ea959076d..930298dbe 100644
--- a/server/lib/cache/videos-preview-cache.ts
+++ b/server/lib/cache/videos-preview-cache.ts
@@ -56,7 +56,6 @@ class VideosPreviewCache {
56 } 56 }
57 57
58 private saveRemotePreviewAndReturnPath (video: VideoModel) { 58 private saveRemotePreviewAndReturnPath (video: VideoModel) {
59
60 return new Promise<string>((res, rej) => { 59 return new Promise<string>((res, rej) => {
61 const req = fetchRemoteVideoPreview(video, rej) 60 const req = fetchRemoteVideoPreview(video, rej)
62 const path = join(CACHE.DIRECTORIES.PREVIEWS, video.getPreviewName()) 61 const path = join(CACHE.DIRECTORIES.PREVIEWS, video.getPreviewName())