aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-18 10:53:54 +0100
committerChocobozzz <me@florianbigard.com>2018-01-18 15:42:20 +0100
commitf05a1c30c15d2ae35c11e241ca039a72eeb7d6ad (patch)
tree6d90c0de5dd3ad506e738d447e4f396951ed5624 /server/lib/activitypub/videos.ts
parent1174a8479ab9ee47b3305d668fe757435057a298 (diff)
downloadPeerTube-f05a1c30c15d2ae35c11e241ca039a72eeb7d6ad.tar.gz
PeerTube-f05a1c30c15d2ae35c11e241ca039a72eeb7d6ad.tar.zst
PeerTube-f05a1c30c15d2ae35c11e241ca039a72eeb7d6ad.zip
Don't show videos of remote instance after unfollow
Diffstat (limited to 'server/lib/activitypub/videos.ts')
-rw-r--r--server/lib/activitypub/videos.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index 5b429709f..1d2d46cbc 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -20,17 +20,16 @@ import { VideoShareModel } from '../../models/video/video-share'
20import { getOrCreateActorAndServerAndModel } from './actor' 20import { getOrCreateActorAndServerAndModel } from './actor'
21 21
22function fetchRemoteVideoPreview (video: VideoModel, reject: Function) { 22function fetchRemoteVideoPreview (video: VideoModel, reject: Function) {
23 // FIXME: use url
24 const host = video.VideoChannel.Account.Actor.Server.host 23 const host = video.VideoChannel.Account.Actor.Server.host
25 const path = join(STATIC_PATHS.PREVIEWS, video.getPreviewName()) 24 const path = join(STATIC_PATHS.PREVIEWS, video.getPreviewName())
26 25
26 // We need to provide a callback, if no we could have an uncaught exception
27 return request.get(REMOTE_SCHEME.HTTP + '://' + host + path, err => { 27 return request.get(REMOTE_SCHEME.HTTP + '://' + host + path, err => {
28 if (err) reject(err) 28 if (err) reject(err)
29 }) 29 })
30} 30}
31 31
32async function fetchRemoteVideoDescription (video: VideoModel) { 32async function fetchRemoteVideoDescription (video: VideoModel) {
33 // FIXME: use url
34 const host = video.VideoChannel.Account.Actor.Server.host 33 const host = video.VideoChannel.Account.Actor.Server.host
35 const path = video.getDescriptionPath() 34 const path = video.getDescriptionPath()
36 const options = { 35 const options = {