Fix preview 404
This commit is contained in:
parent
d50acfab69
commit
f40bbe3146
|
@ -22,7 +22,9 @@ function fetchRemoteVideoPreview (video: VideoModel, reject: Function) {
|
|||
const host = video.VideoChannel.Account.Actor.Server.host
|
||||
const path = join(STATIC_PATHS.PREVIEWS, video.getPreviewName())
|
||||
|
||||
return request.get(REMOTE_SCHEME.HTTP + '://' + host + path, err => reject(err))
|
||||
return request.get(REMOTE_SCHEME.HTTP + '://' + host + path, err => {
|
||||
if (err) reject(err)
|
||||
})
|
||||
}
|
||||
|
||||
async function fetchRemoteVideoDescription (video: VideoModel) {
|
||||
|
|
|
@ -56,7 +56,6 @@ class VideosPreviewCache {
|
|||
}
|
||||
|
||||
private saveRemotePreviewAndReturnPath (video: VideoModel) {
|
||||
|
||||
return new Promise<string>((res, rej) => {
|
||||
const req = fetchRemoteVideoPreview(video, rej)
|
||||
const path = join(CACHE.DIRECTORIES.PREVIEWS, video.getPreviewName())
|
||||
|
|
Loading…
Reference in New Issue