mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-22 08:46:54 -06:00
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) {
|
||||
|
1
server/lib/cache/videos-preview-cache.ts
vendored
1
server/lib/cache/videos-preview-cache.ts
vendored
@ -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
Block a user